[BKM]在Solaris上使用 vim + cscope 浏览内核源代码
来源:互联网 发布:thinkphp b2b源码 编辑:程序博客网 时间:2024/06/10 05:50
Using vim + cscope to browse kernel source code
-
Download vim source from here: [vim-7.1.tar.bz2].
-
Build vim with "-enable-cscope " option and install it.
[aubrey-neveda@vim71] export PATH=$PATH:/usr/sfw/bin
[aubrey-neveda@vim71] ./configure --prefix=/usr --enable-cscope
[aubrey-neveda@vim71] make
[aubrey-neveda@vim71] su
Password:
# make install
[aubrey-neveda@vim71] which vim
/usr/bin/vim
- Getting colors vim to work on Solaris
- touch vimrc file and add the following line
[aubrey-neveda@vim71] cat ~/.vimrc
:syntax on
- export environment variable TERM=xtermc
[aubrey-neveda@vim71] set | grep TERM
TERM=xtermc
Now you should have a color vim. Open a C file to give a shot.
-
Download the cscope_maps.vim file, and stick it in your $HOME/.vim/plugin directory (create the directory if it doesn't exist).
[aubrey-neveda@vim71] ls -l ~/.vim/plugin/
total 16
-rwxr--r-- 1 nobody nobody 7336 Jul 12 09:58 cscope_maps.vim
- Building cscope database manually. The ON 'xref' utility builds the database in cscope-fast format. So it has to be re-built.
- cd to the directory where you want to start
-
find . -name *.h >>cscope.files.bak
-
find . -name *.c >>cscope.files.bak
-
grep -v SCCS cscope.files.bak >cscope.files
- cscope -b
Now vim + cscope is ready to browse the source code. The following feature is very handy.
-
vim -t symbol: start vim and position the cursor at the file and line where the symbol is defined
- ctrl + ]: find the symbol under the cursor
- ctrl + / then s: find the caller of the symbol under the cursor
- ctrl + t: jump back to the original location before the search
- [BKM]在Solaris上使用 vim + cscope 浏览内核源代码
- 使用gtags、etags、cscope、grep浏览源代码
- 使用gtags、etags、cscope、grep浏览源代码
- 在vim中使用cscope
- 在vim中使用cscope
- 使用Vim+Ctags+Cscope阅读源代码
- 使用Vim+Ctags+Cscope阅读源代码
- 使用Vim+Ctags+Cscope阅读源代码
- 使用Vim+Ctags+Cscope阅读源代码
- 使用Vim+Ctags+Cscope阅读源代码
- 使用Vim+Ctags+Cscope阅读源代码
- 使用vim+cscope/ctags阅读内核代码
- 使用vim+ctags+cscope阅读内核源码
- 使用vim+ctags+cscope阅读内核源码
- 使用vim+ctags+cscope阅读内核源码
- 使用vim+ctags+cscope阅读内核源码
- 使用vim+ctags+cscope阅读内核源码
- 使用vim+ctags+cscope阅读内核源码
- 通过login.conf对帐号进行限制
- XML相关网站(转贴)
- 进行磁盘配额
- 费解的NTDLL断点(转载)
- 一个可以气死日本人的中国大学生
- [BKM]在Solaris上使用 vim + cscope 浏览内核源代码
- Backdoor.Win32.Agent.ahj(backdoor.agent.ahj
- jsp 利用cookie 记住用户名和密码
- 整合Spring和Struts的几种方法
- crontab使用
- 关于RFC(Request For Comments)转
- windows下putty 连接linux远程管理
- 怎样new一个二维数组?
- sql server 多种方式 查找重复记录