通过VIM搭建一个IDE,网上的文章有很多,这里就不献丑了。
下面记录下生成tags,cscope.out, cscope.files的脚本文件
一、windows版本(.bat)
del cscope.out cscope.files tags
echo del "cscope.out cscope.files tags" successful!
echo "ctags create"
ctags --languages=c --langmap=c:+.h --extra=+q -R
echo "cscope create"
dir /s /b *.c *.h > cscope.files
cscope -bCkR -i cscope.files
注意:
1. 执行上面的脚本前,请确保正确安装了ctags.exe和cscope.exe,并配置到了环境变量PATH下。
2. windows下生成的cscope.files中的路径是绝对路径
针对lvr的生成脚本:
@echo off
goto start
1. 获取当前路径
2. 得到cscope.files的全路径
3. 删除原来生成的文件
4. 将lib的源文件加入cscope.files
5. 将lvr的源文件加入cscope.files
6.