[vim] Some mapping for cscope in .vim/cscope/

This commit is contained in:
Mathieu Maret 2011-05-26 14:25:51 +02:00
parent a9b470d1c6
commit 8747c4dba6

12
.vimrc
View File

@ -11,7 +11,9 @@
" F8 view tag list
" S-F8 build ctags/cscope databases
" M-F8 build kernel ctags/cscope databases
" F9 view changes
" F9 build cscope in .vim/cscope
" S-F9 Search cscopeDB in .vim/cscope
" M-F9 diff tool
" F10 folding
" F11 unhighlight search
" F12 paste mode
@ -215,6 +217,10 @@ else
map <M-F8> :CtagsKernelBuild<CR><CR>
endif
if has("cscope")
map <S-F9> :call GetCscopeDb(expand("%:p:h")) <CR><CR>
map <F9> :call GenerateCscopeDb() <CR><CR>
endif
" close preview window after a completion
if has("autocmd")
autocmd CursorMovedI *.{[hc],cpp} if pumvisible() == 0|pclose|endif
@ -299,8 +305,8 @@ imap <M-S-F1> <Esc><M-S-F1>
" show current changes with F9
command! DiffOrig
\ vert new | set bt=nofile | r # | 0d_ | diffthis | wincmd p | diffthis
map <F9> :DiffOrig<CR>
imap <F9> <ESC><F9>a
map <M-F9> :DiffOrig<CR>
imap <M-F9> <ESC><M-F9>a
" show git diff when committing
let g:git_diff_spawn_mode = 1
if has("autocmd")