[vim] bindings for git gutter

This commit is contained in:
Mathieu Maret 2014-04-08 14:26:26 +02:00 committed by Mathieu Maret
parent 590a76f6a7
commit baee28c346
2 changed files with 16 additions and 9 deletions

View File

@ -103,10 +103,10 @@ if has("cscope")
endfunction
command! GenerateCscopeDb :call GenerateCscopeDb()
if has("cscope")
map <F9> :call GetCscopeDb(expand("%:p:h")) <CR><CR>
map <S-F9> :call GenerateCscopeDb() <CR><CR>
map <M-F9> :call GetLocalCscopeDb(expand("%:p:h")) <CR><CR>
endif
"" if has("cscope")
"" map <F9> :call GetCscopeDb(expand("%:p:h")) <CR><CR>
"" map <S-F9> :call GenerateCscopeDb() <CR><CR>
"" map <M-F9> :call GetLocalCscopeDb(expand("%:p:h")) <CR><CR>
"" endif
endif

15
.vimrc
View File

@ -12,8 +12,8 @@
" F8 view tag list
" S-F8 build ctags/cscope databases
" M-F8 build kernel ctags/cscope databases
" S-F9 build cscope in .vim/cscope
" F9 Search cscopeDB in .vim/cscope
" F9 Show diff line
" S-F9 Highlight diff line
" M-F10 diff tool
" F10 folding
" S-F10 unfolding
@ -299,7 +299,7 @@ nmap <S-F2> :split <C-R>=expand("%:h") . "/"<CR>
runtime! ftplugin/man.vim
" show vimrc with shift+F1
nmap <silent> <S-F1> :tabe ~/.vimrc<CR>gg
"imap <F1> <Esc><S-F1>
imap <S-F1> <Esc><S-F1>
" show contextual help with F1
function Help()
try
@ -413,6 +413,12 @@ let g:Tex_DefaultTargetFormat="pdf"
colorscheme mycolor
cnoremap sudow w !sudo tee % >/dev/null
"""""""""""
" gitgutter
"""""""""""
map <F9> :GitGutterSignsToggle <CR>
map <S-F9> :GitGutterLineHighlightsToggle <CR>
"""""""""
" Plugin"
"""""""""
@ -428,5 +434,6 @@ Plugin 'gmarik/vundle'
" plugin from github
Plugin 'airblade/vim-gitgutter'
Plugin 'tpope/vim-fugitive'
" Same as gitgutter but for other cvs
"Plugin mhinz/vim-signify