Skip to content

Commit 7d7e771

Browse files
committed
feature: vimrc add cscope and gitgutter
1 parent 11d1d52 commit 7d7e771

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

linux_home/.vimrc

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Plugin 'VundleVim/Vundle.vim'
99
Plugin 'majutsushi/tagbar'
1010
Plugin 'fholgado/minibufexpl.vim'
1111
Plugin 'scrooloose/nerdtree'
12-
Plugin 'tomasr/molokai'
12+
Plugin 'airblade/vim-gitgutter'
1313

1414
call vundle#end() " required
1515
filetype plugin indent on " required
@@ -21,9 +21,10 @@ filetype plugin indent on " required
2121
set number
2222
" width of a tabstop
2323
" soft just used for backspace
24-
set tabstop=2
25-
set softtabstop=2
26-
set shiftwidth=2
24+
set tabstop=4
25+
set softtabstop=4
26+
" indent = 4
27+
set shiftwidth=4
2728
" tab -> space
2829
set smarttab
2930
set expandtab
@@ -105,5 +106,22 @@ let NERDTreeMinimalUI=1
105106
" " 删除文件时自动删除文件对应 buffer
106107
let NERDTreeAutoDeleteBuffer=1
107108

109+
" git gutter
110+
111+
108112
" cscope
109-
map g<c-\> :cs find 0 <C-R>=expand("<cword>")<CR><CR>
113+
if has('cscope')
114+
set cscopetag cscopeverbose
115+
116+
if has('quickfix')
117+
set cscopequickfix=s-,d-,i-,e-
118+
endif
119+
120+
cnoreabbrev csa cs add
121+
cnoreabbrev csf cs find
122+
123+
command -nargs=0 Cscope cs add $VIMSRC/src/cscope.out $VIMSRC/src
124+
map g<c-\> :cs find 0 <C-R>=expand("<cword>")<CR><CR>
125+
nmap <C-\>c :cs find c <C-R>=expand("<cword>")<CR><CR>
126+
endif
127+

0 commit comments

Comments
 (0)