vi和ctags,cscope
2011-08-09 14:18
183 查看
1.检查使用的vi或者vim是否支持cscope
$ vi --version| grep cscope
-cryptv -cscope -cursorshape -dialog -diff -digraphs -dnd -ebcdic -emacs_tags
$ vim --version | grep cscope
-conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con_gui +diff
Features included (+) or not (-)
+表示支持,-表示不支持。由上面的结果可以看出,vi不支持,vim支持;
可以看一下他们的路径,就知道他们不是不同的可执行程序;
$ which vi
/bin/vi
$which vim
/usr/bin/vim
2.如果vim没有支持cscope的话,可以自己下载vim的source进行编译:
2.1 download src from http://www.vim.org/download.php
2.2 extract gat file, cd src/
2.3 make distclean; rm auto/config.cache
2.4 edit Makefile file
430 # CSCOPE
431 # Uncomment this when you want to include the Cscope interface.
432 #CONF_OPT_CSCOPE = --enable-cscope -->
CONF_OPT_CSCOPE = --enable-cscope
or ./configure --enable-cscope
2.5 su root
make; make INSTALL
3. 对所有的目录使用ctags和cscope
ctags -R *
cscope -R
vim -t yoursymbol
4. 对特定的文件使用ctags和cscope
find . -name '*.java' -print > cscope.files
ctags -L cscope.files(ctags -e -L cscope.files )
cscope -ub -i cscope.files
5. ctags和cscope在vi中的快捷键
5.1 cscope的快捷键定义可以自己定制,但是网上已经有了定义好的文件:http://cscope.sourceforge.net/cscope_maps.vim
直接使用就可以了,如果vim是6.0之后的,直接将该文件放在~/vim/plugin/下就可以了。
ctags: ctrl+T 返回; ctrl+] 到定义
cscope: ctrl+T 返回; ...
6.你也可以单独使用cscope,使用方法是: cscope -d yoursymbol
refs:http://softsmith.blogspot.com/2009/01/vim-cscope-trace.html
$ vi --version| grep cscope
-cryptv -cscope -cursorshape -dialog -diff -digraphs -dnd -ebcdic -emacs_tags
$ vim --version | grep cscope
-conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con_gui +diff
Features included (+) or not (-)
+表示支持,-表示不支持。由上面的结果可以看出,vi不支持,vim支持;
可以看一下他们的路径,就知道他们不是不同的可执行程序;
$ which vi
/bin/vi
$which vim
/usr/bin/vim
2.如果vim没有支持cscope的话,可以自己下载vim的source进行编译:
2.1 download src from http://www.vim.org/download.php
2.2 extract gat file, cd src/
2.3 make distclean; rm auto/config.cache
2.4 edit Makefile file
430 # CSCOPE
431 # Uncomment this when you want to include the Cscope interface.
432 #CONF_OPT_CSCOPE = --enable-cscope -->
CONF_OPT_CSCOPE = --enable-cscope
or ./configure --enable-cscope
2.5 su root
make; make INSTALL
3. 对所有的目录使用ctags和cscope
ctags -R *
cscope -R
vim -t yoursymbol
4. 对特定的文件使用ctags和cscope
find . -name '*.java' -print > cscope.files
ctags -L cscope.files(ctags -e -L cscope.files )
cscope -ub -i cscope.files
5. ctags和cscope在vi中的快捷键
5.1 cscope的快捷键定义可以自己定制,但是网上已经有了定义好的文件:http://cscope.sourceforge.net/cscope_maps.vim
直接使用就可以了,如果vim是6.0之后的,直接将该文件放在~/vim/plugin/下就可以了。
ctags: ctrl+T 返回; ctrl+] 到定义
cscope: ctrl+T 返回; ...
6.你也可以单独使用cscope,使用方法是: cscope -d yoursymbol
refs:http://softsmith.blogspot.com/2009/01/vim-cscope-trace.html
相关文章推荐
- VI+Cscope+Ctags快速上手
- ubuntu vi ctags cscope
- 在window7下使用vi + ctags + cscope + taglist
- vi编辑器的配置(cscope+vim+ctags+c.vim)
- vi/Vim + Cscope/Ctags
- vi/Vim + Cscope/Ctags
- vi/Vim + Cscope/Ctags
- vi/Vim + Cscope/Ctags
- cscope和ctags配合vi阅读源码
- vi ctags cscope
- vi+ctags+cscope联合使用
- 最近SLICKedit 挂了,就只能找替代品了,发现了VI+cscope+ctags!
- 安装linux开发环境(vim + ctags + taglist + cscope + cppcomplete + global )
- windows下gvim+ctags+cscope+taglist
- vim + ctags + taglist + cscope + cppcomplete + global 使用初探
- vim+ctags+cscope工具
- 将Vim改造为强大的IDE—Vim集成Ctags/Taglist/Cscope/Winmanager/NERDTree/OmniCppComplete(有图有真相)
- 使用vim+ctags+cscope阅读内核源码
- Linux下代码阅读 -- 配置vim+ctags+taglist+cscope[转]
- vim+ctags+cscope 打造Android源码阅读工具