用ctags为linux系统头文件生成systags
来源:互联网 发布:新还珠格格第三部知画 编辑:程序博客网 时间:2024/05/16 12:54
#!/bin/bash# Program:# This program is used to generate system ctags for vim editor and auto add path for vim#History:# 2012/12/6 Kom First releasePATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/~/binexport PATH# The ctags result will be store at /home/$(USER)/.vim/systagssystagsdirpath="/home/${USER}/.vim/"systagspath="${systagsdirpath}systags"#echo ${systagsdirpath}#echo ${systagspath}# detect specific directory is exist# return:# 0: exist# 1: doesn't exist# 2: parameters number errorfunction isdirexist(){ if [ $# -eq 0 ] || [ $# -gt 1 ]; then return 2 fi if [ -d $1 ]; then return 0 else return 1 fi}#detect specific file is exist#return:# 0: exist# 1: doesn't exist# 2: parameters number errorfunction isfileexist(){ if [ $# -eq 0 ] || [ $# -gt 1 ]; then return 2 fi if [ -e $1 ]; then return 0 else return 1 fi}# if the dir to store systags doesn't exist, create itisdirexist ${systagsdirpath}if [ $? == 1 ]; then echo -n "'"${systagsdirpath}"' doesn't exist, now create ... " mkdir ${systagsdirpath} isdirexist ${systagsdirpath} if [ $? == 0 ]; then echo "success." else echo "FAILED." return 1 fielse echo "'"${systagsdirpath}"' already exist."fi# if the systags file already exist, delete itisfileexist ${systagspath}if [ $? == 1 ]; then echo "'"${systagspath}"' doesn't exist."else echo -n "'"${systagspath}"' already exist, now delete is ... " rm -fr ${systagspath} isfileexist ${systagspath} if [ $? == 1 ]; then echo "success." else echo "FAILED." return 1 fifi# now, generate tags fileecho -n "Now, generate system ctags for vim editor ... "ctags -I __THROW -I __attribute__ -I __attribute_pure__ -I __nonnull --file-scope=yes --langmap=c:+.h --languages=c,c++ --links=yes --c-kinds=+p --c++-kinds=+p --fields=+iaS --extra=+q -R -f ${systagspath} /usr/include /usr/local/include#ctags -I __THROW -I __attribute__ -I __attribute_pure__ -I __nonnull --file-scope=yes --langmap=c:+.h --languages=c,c++ --links=yes --c-kinds=+p --c++-kinds=+p --fields=+iaS --extra=+q -f ${systagspath} /usr/include/* /usr/include/sys/* /usr/include/bits/* /usr/include/netinet/* /usr/include/arpa/* /usr/include/mysql/*echo "success."# now, add it to the vimecho -n "Now, add it to the vim ... "echo "set tags+=${systagspath}" >> /home/${USER}/.vimrcecho "success."
0 0
- 用ctags为linux系统头文件生成systags
- 用ctags为linux系统头文件生成systags
- ctags为系统头文件目录生成tags
- ctags为系统头文件目录生成tags
- ctags 为系统相关头文件生成tags
- ctags为系统头文件目录生成tags
- ctags为系统头文件目录生成tags
- ctags为系统头文件目录生成tags
- ctags 生成系统头文件、第三方库头文件的 tag
- ctags 生成系统头文件、第三方库头文件的 tag
- 为系统头文件目录生成tags
- 为VC系统头文件生成tags
- linux系统头文件
- Linux系统头文件
- linux系统头文件
- ctags可以分析程序生成tag文件为vim所用
- linux jni头文件生成
- linux 系统头文件 总结
- 最长递增子序列
- getHeight/getTop
- 转移线程的所有权
- hive使用python脚本导致java.io.IOException: Broken pipe异常退出
- 关于Visual Studio 2013 编译 multi-byte character set MFC程序出现 MSB8031 错误的解决办法
- 用ctags为linux系统头文件生成systags
- 渍拽滋转桌妆妆撞阻祝啄孜妆拽钻组纂卒
- 查询oracle中所有用户信息
- 撞纵拽准浊抓左注组总撰踪总准祖转赚浊
- MySQL性能优化的最佳20+条经验
- 回环设备(loop-back devices)
- 安装qt-embedded-linux-opensource-src-4.5.3
- ClipMenu - Mac os 下的开发利器 多剪切板
- [kmp+dp] hdu 4628 Pieces