Mac环境vim+cscope+taglist

1. Install software.

$brew install vim

$brew install cscope

$brew install ctags


2. ~/.vimrc

syntax on

filetype on


set ru


set backspace=indent,eol,start

set whichwrap=b,s,<,>,[,]



set nocompatible

set number

set history=1000

set background=dark


set autoindent

set smartindent


set expandtab

set tabstop=4

set shiftwidth=4


set showmatch

set guioptions-=T

set vb t_vb=

set ruler

set nohls

set cindent

set incsearch


let Tlist_Auto_Open=1

let Tlist_Show_One_File=1

let Tlist_Exit_OnlyWindow=1

colorscheme evening


3. cscope+taglist

    taglist 的下载地址:
    http://www.vim.org/scripts/script.php?script_id=273

    cscope_maps.vim的下载地址:
    http://cscope.sourceforge.net/cscope_maps.vim

   将下载解压后的文件cppcomplete.vim,taglist.vim和cscope_maps.vim拷贝到~/.vim/plugin中

    修改cscope_maps.vim
    nmap s :cs find s =expand("")  
    nmap g :cs find g =expand("")  
    nmap c :cs find c =expand("")  
    nmap t :cs find t =expand("")  
    nmap e :cs find e =expand("")  
    nmap f :cs find f =expand("")  
    nmap i :cs find i ^=expand("")$
    nmap d :cs find d =expand("") 


你可能感兴趣的:(mac开发环境)