当前位置:网站首页>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
边栏推荐
- Yarn resource scheduler
- SQL Server cursor circular table data
- SQL Server 递归查询上下级
- IDEA——》每次启动都会Indexing或 scanning files to index
- 59. Spiral matrix (array)
- JVM - common parameters
- 242、有效字母异位词(哈希表)
- RESTful和SOAP的区别
- 203. Remove linked list elements (linked list)
- Qinglong panel pull library command update [April 20, 2022] collection is not lost
猜你喜欢
Jinglianwen technology - professional data annotation company and intelligent data annotation platform
基于PyQt5实现弹出任务进度条功能示例
Idea - indexing or scanning files to index every time you start
Swagger2 自定义参数注解如何不显示
Reading integrity monitoring techniques for vision navigation systems - 5 Results
Yarn core parameter configuration
Initial exploration of NVIDIA's latest 3D reconstruction technology instant NGP
How does the swagger2 interface import postman
The courses bought at a high price are open! PHPer data sharing
Net start MySQL MySQL service is starting MySQL service failed to start. The service did not report any errors.
随机推荐
349、两个数组的交集
Xshell+Xftp 下载安装步骤
Ueditor -- limitation of 4m size of image upload component
Contact between domain name and IP address
链表相交(链表)
What about Jerry's stack overflow? [chapter]
Sim Api User Guide(8)
Installing MySQL with CentOS / Linux
19. Delete the penultimate node of the linked list (linked list)
SSH利用私钥无密钥连接服务器踩坑实录
HuggingFace
Sim Api User Guide(6)
Can Jerry's AES 256bit [chapter]
【leetcode】199.二叉树的右视图
Windows installs redis and sets the redis service to start automatically
Solve the problem of installing VMware after uninstalling
精彩回顾 | DEEPNOVA x Iceberg Meetup Online《基于Iceberg打造实时数据湖》
CentOS/Linux安装MySQL
中职网络安全2022国赛之CVE-2019-0708漏洞利用
142、环形链表||