开发工具组合-- Vim + ctags + taglist 篇(转)
开发工具组合-- Vim + ctags + taglist 篇
看完C版flw老大那篇关于vim的超长贴后.闲来无事,自己配个来玩玩.这些配置方法可能在网上已经存在,但偶也懒得去搜,反正只是简单的配置,深入的只有自行摸索或请教flw,雨丝风片,gvim等高手.:lol:更希望大家也说说自己的工具组合及配置.
1.安装Vim.
[quote]# cd /usr/ports/editors/vim
# make install clean
[/quote]
2.安装ctags.
[quote]# cd /usr/ports/devel/ctags/
# make install clean
[/quote]
3.安装taglist.
下载taglist_40b3.zip:http://vim.sourceforge.net/scripts/script.php?script_id=273
解压:
[quote]# cd /usr/local/share/vim/vim64/
# unzip taglist_40b3.zip
[/quote]
4.配置
[quote]# cp /usr/local/share/vim/vim64/vimrc_example.vim ~/.vimrc
[/quote]
PS:更多的配置选项请看说明,或到C版跟贴问flw.:em02:
[quote]The executable for Exuberant CTAGS is installed as %%PREFIX%%/bin/exctags[/quote]
由于ports安装的ctags已经包含ctags及Exuberant ctags,taglist需要Exuberant ctags,执行文件是exctags而不是ctags,所以需要修改taglist.vim.
# vi /usr/local/share/vim/vim64/plugin/taglist.vim,在"if !exists('loaded_taglist')"前加一行.
[quote]
let Tlist_Ctags_Cmd = "/usr/local/bin/exctags"
[/quote]
PS:在~/.vimrc添加亦可.
5.生成tags文件
# cd /usr/src/sbin/mount
# exctags -R *
6.启动Vim,打开mount.c,输入:Tlist即可,效果看下图.