[vim] Some mapping for cscope in .vim/cscope/
This commit is contained in:
parent
a9b470d1c6
commit
8747c4dba6
12
.vimrc
12
.vimrc
@ -11,7 +11,9 @@
|
|||||||
" F8 view tag list
|
" F8 view tag list
|
||||||
" S-F8 build ctags/cscope databases
|
" S-F8 build ctags/cscope databases
|
||||||
" M-F8 build kernel 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
|
" F10 folding
|
||||||
" F11 unhighlight search
|
" F11 unhighlight search
|
||||||
" F12 paste mode
|
" F12 paste mode
|
||||||
@ -215,6 +217,10 @@ else
|
|||||||
map <M-F8> :CtagsKernelBuild<CR><CR>
|
map <M-F8> :CtagsKernelBuild<CR><CR>
|
||||||
endif
|
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
|
" close preview window after a completion
|
||||||
if has("autocmd")
|
if has("autocmd")
|
||||||
autocmd CursorMovedI *.{[hc],cpp} if pumvisible() == 0|pclose|endif
|
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
|
" show current changes with F9
|
||||||
command! DiffOrig
|
command! DiffOrig
|
||||||
\ vert new | set bt=nofile | r # | 0d_ | diffthis | wincmd p | diffthis
|
\ vert new | set bt=nofile | r # | 0d_ | diffthis | wincmd p | diffthis
|
||||||
map <F9> :DiffOrig<CR>
|
map <M-F9> :DiffOrig<CR>
|
||||||
imap <F9> <ESC><F9>a
|
imap <M-F9> <ESC><M-F9>a
|
||||||
" show git diff when committing
|
" show git diff when committing
|
||||||
let g:git_diff_spawn_mode = 1
|
let g:git_diff_spawn_mode = 1
|
||||||
if has("autocmd")
|
if has("autocmd")
|
||||||
|
Loading…
Reference in New Issue
Block a user