现在的位置: 首页 > 综合 > 正文

建立vim工程步骤

2013年01月31日 ⁄ 综合 ⁄ 共 455字 ⁄ 字号 评论关闭

1、为lookupfile插件生成查找源,在工程目录下运行$genfiletags

2、在vim命令行中执行let g:LookupFile_TagExpr ='"工程目录/filenametags"'

3、在vim命令中执行:cs add 工程目录/cscope.out 工程目录

 

 

genfiletags文件中的内容为:

 

/* lookupfile */

# generate tag file for lookupfile plugin
echo -e "!_TAG_FILE_SORTED\t2\t/2=foldcase/" > filenametags
find . -not -regex '.*\.\(png\|gif\)' -type f -printf "%f\t%p\t1\n" | \
sort -f >> filenametags

 

/* 用于cscope */

find . -name "*.h" -o -name "*.c" -o -name "*.cc" > cscope.files
cscope -bkq -i cscope.files
ctags -R

抱歉!评论已关闭.