Using ctags and Vim is a lethal combination, especially when doing bigger projects.
Using them gives you the following features:
Tag list opens a left window where you can browse the current file. It gives a nice overview. Here is an example (click for a bigger picture):
First download ctags. On Debian/Ubuntu it would be:
sudo apt-get install exuberant-ctags
After this, install the taglist.vim plugin, you can get it here.
Now you need to configure taglist.vim, this can be done like this:
let Tlist_Ctags_Cmd = "/usr/bin/ctags" let Tlist_WinWidth = 50 map <F4> :TlistToggle<cr>
Pressing F4 will toggle the taglist window on and off. Try it out, it's really useful :)
For more options look in taglist.txt documentation, it comes when downloading taglist.vim.
I have one mapping in vimrc:
map <F8> :!/usr/bin/ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .<CR>
This builds tags libs for the current working directory (it's super fast).
Once you have build tags, you can browse them using builtin functions. Here are some examples:
If you want full power out of this I recommend reading following documentation:
----------------------------------------------------------------------------------------------------------------------
自动补全括号与引号(加入.vimrc中)
- inoremap ( ()<ESC>i
- inoremap ) <c-r>=ClosePair(')')<CR>
- inoremap { {}<ESC>i
- inoremap } <c-r>=ClosePair('}')<CR>
- inoremap [ []<ESC>i
- inoremap ] <c-r>=ClosePair(']')<CR>
- inoremap < <><ESC>i
- inoremap > <c-r>=ClosePair('>')<CR>
- :inoremap " ""<ESC>i
- :inoremap ' ''<ESC>i
- function ClosePair(char)
- if getline('.')[col('.') - 1] == a:char
- return "\<Right>"
- else
- return a:char
- endif
- endf
本日志由 flyinweb 于 2010-07-29 11:46:40 发表,目前已经被浏览 3952 次,评论 0 次;
引用通告:http://www.517sou.net/Article/501/Trackback.ashx
It is quite useful and interesting too.
VIRT 的上限是64G,也就是36位, cat /proc/cpuinfo的结果是:addre
昨天要准备用线程重写webbench,试验了下Fedora Linux 2.6.35.14
不明白您的具体的意思是什么?
已经发送到你QQ邮箱
http://www.2mysite.net/scriptencoder/screnc.asp 站长你好,看
你好,我发现一个问题,就是从mysqld2同步过来的数据,在mysqld1的
晕,我说是怎么回事情,原来我和你一样,忘记设置了活动分区