Menu Home

mac下vim + taglist + ctags

mac下vim + taglist + ctags
1 . 下载 taglist http://www.vim.org/scripts/script.php?script_id=273
2. 解压缩后拷贝 plugin和doc文件到~/.vim文件夹,进入doc文件夹,运行vim ,输入命令:helptags .

3. 因为mac自带的ctags程序不是exuberant ctags, 所以使用时会出现问题,需要自己下载ctags编译安装到非/usr/bin 目录下:

http://sourceforge.net/projects/ctags/files/ctags/5.8/ctags-5.8.tar.gz/download

4.打开vimrc配置文件加入ctags路径:let Tlist_Ctags_Cmd=’/Users/xxx/bin/ctags’

5.在vimrc里配置taglist :

let Tlist_Show_One_File=1
let Tlist_Exit_OnlyWindow=1
let Tlist_Use_Right_Window=1

6. 打开vim,可以用命令 :Tlist

7. 我的vimrc配置:

syntax on
set nu
set cindent
set smartindent
set showmatch
set incsearch
set shiftwidth=4
set ruler
set tabstop=4
set title
set smarttab
set fdm=indent
filetype on
set autoindent
let Tlist_Ctags_Cmd='/Users/xxx/bin/ctags'
let Tlist_Show_One_File=1
let Tlist_Exit_OnlyWindow=1
let Tlist_Use_Right_Window=1

1 reply

Leave a Reply

Your email address will not be published.