ubuntu vi ctags cscope
2013-08-05 11:28
267 查看
安装vi
sudo apt-get install vim
sudo apt-get install cscope
sudo apt-get install ctags
然后在/etc/vim/vimrc 中添加
if has("cscope")
set cscopetag
set csto=0
if filereadable("cscope.out")
cs add cscope.out
" else add the database pointed to by environment variable
elseif $CSCOPE_DB != ""
cs add $CSCOPE_DB
endif
set cscopeverbose
nmap <C-\>s :cs find s <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>g :cs find g <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>c :cs find c <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>t :cs find t <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>e :cs find e <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>f :cs find f <C-R>=expand("<cfile>")<CR><CR>
nmap <C-\>i :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
nmap <C-\>d :cs find d <C-R>=expand("<cword>")<CR><CR>
endif
然后在项目文件夹下
find -name "*.c" > cscope.files(将c语言程序源代码的所有文件名加入到cscope.files中)
cscope -Rbkq (创建cscope.out cscope.po.out cscope.in.out)
然后每次都可以在vi内使用命令
要在下标模式
:find c main
:find s main
:find c main
首先执行ctags –R
然后执行vi –t tag
sudo apt-get install vim
sudo apt-get install cscope
sudo apt-get install ctags
然后在/etc/vim/vimrc 中添加
if has("cscope")
set cscopetag
set csto=0
if filereadable("cscope.out")
cs add cscope.out
" else add the database pointed to by environment variable
elseif $CSCOPE_DB != ""
cs add $CSCOPE_DB
endif
set cscopeverbose
nmap <C-\>s :cs find s <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>g :cs find g <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>c :cs find c <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>t :cs find t <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>e :cs find e <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>f :cs find f <C-R>=expand("<cfile>")<CR><CR>
nmap <C-\>i :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
nmap <C-\>d :cs find d <C-R>=expand("<cword>")<CR><CR>
endif
然后在项目文件夹下
find -name "*.c" > cscope.files(将c语言程序源代码的所有文件名加入到cscope.files中)
cscope -Rbkq (创建cscope.out cscope.po.out cscope.in.out)
然后每次都可以在vi内使用命令
要在下标模式
:find c main
:find s main
:find c main
首先执行ctags –R
然后执行vi –t tag
相关文章推荐
- Ubuntu下vi安装ctags步骤
- ubuntu vim+ctags+cscope简单配置
- Ubuntu 安装 Cscope 和 Ctags
- vi/Vim + Cscope/Ctags
- vi/Vim + Cscope/Ctags
- Ubuntu16.04 server 安装Ctags和Cscope的方法
- vi/Vim + Cscope/Ctags
- Ubuntu 安装 cscope 和 ctags
- ubuntu vim+ctags+taglist+cscope
- ubuntu下如何使用vim cscope ctags
- Ubuntu下使用sublime text 3安装插件Package Control+cTags+Cscope后查看源码利器
- ubuntu vim+ctags+cscope简单配置
- gvim+ctags+cscope在ubuntu上的安装与配置
- vi编辑器的配置(cscope+vim+ctags+c.vim)
- vi和ctags,cscope
- vi ctags cscope
- VI+Cscope+Ctags快速上手
- ubuntu下代码查看小妙招--vim ctags cscope的简单用法
- vi+ctags+cscope联合使用
- 最近SLICKedit 挂了,就只能找替代品了,发现了VI+cscope+ctags!