vim配置记录

316 阅读1分钟
  1. 按照 github.com/ruchee/vimr… 进行配置

  2. 安装Vundle

  3. 安装cscope (cscope使用可参考 juejin.cn/post/686635…)

  4. 在.vimmrc中新增

" penn add +
set tags=tags;/

set mouse=a
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'vim-addon-mw-utils'
Plugin 'tlib_vim'
Plugin 'vim-snipmate'

" Optional:
Plugin 'vim-snippets'

call vundle#end()
filetype plugin indent on


if has("cscope")
" set csprg=/usr/local/bin/cscope
set csto=0
set cst
set nocsverb
" add any database in current directory
if filereadable("cscope.out")
cs add cscope.out
" else add database pointed to by environment
elseif $CSCOPE_DB != ""
cs add $CSCOPE_DB
endif
set csverb
endif
nmap <C-\>s :cs find s <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>g :cs find g <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>c :cs find c <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>t :cs find t <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>e :cs find e <C-R>=expand("<cword>")<CR><CR>
nmap <C-\>f :cs find f <C-R>=expand("<cfile>")<CR><CR>
nmap <C-\>i :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
nmap <C-\>d :cs find d <C-R>=expand("<cword>")<CR><CR>

cmap ff cs find f 
"左侧显示标签页
let g:tagbar_left = 1

" penn add -