2 Star 0 Fork 0

appsprit/vimrc

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
make_cscope_db.sh 1.31 KB
一键复制 编辑 原始数据 按行查看 历史
whr4935 提交于 2018-04-13 22:25 . refine Ycm config
#!/bin/sh
# add arguments for extra include path.
kernel_mode=0 #kernel_mode doesn't serach system include path.
cscope_arg=-bqk
while test $# != 0
do
case $1 in
-n|--native)
kernel_mode=0
shift
;;
-k|--kernel-mode)
kernel_mode=1
shift
;;
-h|--help)
echo -n "make_cscope_db.sh [-n|k] [extra include paths]\n"
echo "\t-n: set to native project mode."
echo "\t-k: set to kernel mode (don't search system include path)."
echo "\t-h: show this help."
exit 0
;;
*) break
;;
esac
done
if [ $kernel_mode -eq 0 ];then
cscope_arg=${cscope_arg%k}
echo -n "native mode, "
else
echo -n "kernel mode, "
fi
echo cscope_arg=$cscope_arg
for i in $@
do
arg="-I"$i
args=$args" "$arg
done
find $PWD -path .git -prune \
-o -name "*.h" -print \
-o -name "*.hpp" -print \
-o -name "*.c" -print \
-o -name "*.cc" -print \
-o -name "*.cpp" -print \
> cscope.files
if [ -n "$args" ];then
echo "extra args:\n $args"
fi
cscope $cscope_arg -i cscope.files $args
# ctags --c++-kinds=+px --fields=+liaS --extra=+q -L cscope.files
#ctags -R --c++-kinds=+px --fields=+liaS --extra=+q $PWD $@
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/appsprit/vimrc.git
[email protected]:appsprit/vimrc.git
appsprit
vimrc
vimrc
master

搜索帮助