当前位置:网站首页>VIM + ctags + cscope development environment construction guide
VIM + ctags + cscope development environment construction guide
2022-04-23 10:49:00 【A dazed caddie】
Record and share the commonly used vim development environment , Use ctags and cscope Plug in with the use of , Suitable for beginners , You don't need to be familiar with scripts anymore , Self configuring . Improve coding efficiency .
Resource link : vim Allocate resources Extraction code : i3p4
1、 install ctags
sudo apt-get install ctags
2、 install cscope
sudo apt-get install cscope
3、 Modify the configuration file
3.1、 Backup replacement ~/ In the catalog .vim Folder ,.vimrc file
3.2、 stay ~/.bashrc Add configuration to script
(1) Rename the command that generates the jump index
alias csupdate='find . -name "*.h" -o -name "*.c" -o -name "*.cpp" -o -name "*.hh" -o -name "*.hpp" -o -name "*.cc" > cscope.files; cscope -Rbkq -i cscope.files; ctags -R'
alias csdirupdate='find "$1"" -name "*.h" -o -name "*.c" -o -name "*.cpp" -o -name "*.hh" -o -name "*.hpp" -o -name "*.cc" > cscope.files; cscope -Rbkq -i cscope.files; ctags -R "$1"'
alias csupdate_sys='find /usr/local -name "*.h" -o -name "*.c" -o -name "*.cpp" -o -name "*.hh" -o -name "*.hpp" -o -name "*.cc" > cscope.files; \
find . -name "*.h" -o -name "*.c" -o -name "*.cpp" -o -name "*.hh" -o -name "*.hpp" -o -name "*.cc" >> cscope.files; \
cscope -Rbkq -i cscope.files; ctags -R'
function csupdate_dir {
find $1 -name "*.h" -o -name "*.c" -o -name "*.cpp" -o -name "*.hh" -o -name "*.hpp" -o -name "*.cc" > cscope.files; \
find . -name "*.h" -o -name "*.c" -o -name "*.cpp" -o -name "*.hh" -o -name "*.hpp" -o -name "*.cc" >> cscope.files; \
cscope -Rbkq -i cscope.files; \
ctags -R $1
}
(2) Delete the space at the beginning of each line of the file
alias ffk='find . -name "*.c" -o -name "*.cpp" -o -name "*.hpp" -o -name "*.hh" -o -name "*.h" -o -name "*.mak" -o -name "Makefile" | xargs sed -r -i "s/\s+$//"'
alias fk='find . -name "$1" | xargs sed -r -i "s/\s+$//"'
4、 Use the modified vim Open the code after configuration , In case of garbled code :
Install Fonts :Sans Mono Nerd Font Complete Mono.otf
The of the terminal needs to be modified edit->preference Option is the installed font :
版权声明
本文为[A dazed caddie]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230618290689.html
边栏推荐
- How can swagger2 custom parameter annotations not be displayed
- Wonderful review | deepnova x iceberg meetup online "building a real-time data Lake based on iceberg"
- UEditor之——图片上传组件大小4M的限制
- A diary of dishes | 238 Product of arrays other than itself
- Jerry's factors that usually affect CPU performance test results are: [article]
- Leetcode22: bracket generation
- 域名和IP地址的联系
- Leetcode22:括号生成
- Jerry sometimes finds that the memory has been tampered with, but there is no exception. How should he find it? [chapter]
- CentOS/Linux安装MySQL
猜你喜欢
Introduction to data analysis 𞓜 kaggle Titanic mission (IV) - > data cleaning and feature processing
How to quickly download vscode
Detailed explanation of MapReduce calculation process
SQL Server 递归查询上下级
Deploy jar package
Sim Api User Guide(6)
Comparison and practice of prototype design of knowledge service app
【leetcode】102.二叉树的层序遍历
【省选联考 2022 D2T1】卡牌(状态压缩 DP,FWT卷积)
SQL Server 游标循环表数据
随机推荐
Let the LAN group use the remote device
C#和数据库连接中类的问题
Solve the problem of installing VMware after uninstalling
【leetcode】107. Sequence traversal of binary tree II
MySQL common statements
解决方案架构师的小锦囊 - 架构图的 5 种类型
net start mysql MySQL 服务正在启动 . MySQL 服务无法启动。 服务没有报告任何错误。
Esp32 learning - use and configuration of GPIO
SQL Server recursive query of superior and subordinate
JVM——》常用命令
域名和IP地址的联系
What are the system events of Jerry's [chapter]
Construction and traversal of binary tree
SSH利用私钥无密钥连接服务器踩坑实录
使用zerotier让异地设备组局域网
Learning Notes 6 - Summary of several deep learning convolutional neural networks
MySQL how to merge the same data in the same table
【leetcode】199. Right view of binary tree
Hikvision face to face summary
Understand the new economic model of platofarm and its ecological progress