開發工具組合-- 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即可,效果看.