生成cscope和ctags文件供vim使用,cscope.files和tags文件中生成绝对路径,移到任意目录都能保证正常跳转

2015-11-23 0 547
生成cscope和ctags文件供vim使用,cscope.files和tags文件中生成绝对路径,移到任意目录都能保证正常跳转
#!/bin/sh

find `pwd` -name "*.h" -o -name "*.c" -o -name "*.cc" -o -name "*.cs" -o -name "*.java" > cscope.files
cscope -bkq -i cscope.files

ctags --tag-relative -R
curDir=`pwd`
cat tags | awk -F '\t' '{print $1"\t""'$curDir'/"$2"\t"$3"\t"$4"\t"$5"\t"$6"\t"$7"\t"$8"\t"$9"\t"$10"\t"$11"\t"$12"\t"$13"\t"$14"\t"$15"\t"$16"\t"$17"\t"$18}' > tags2
mv tags2 tags

遇见资源网 shell 生成cscope和ctags文件供vim使用,cscope.files和tags文件中生成绝对路径,移到任意目录都能保证正常跳转 http://www.ox520.com/17267.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务