diff --git a/.vimrc b/.vimrc index 5950028..c07cd5a 100644 --- a/.vimrc +++ b/.vimrc @@ -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 :CtagsKernelBuild endif +if has("cscope") + map :call GetCscopeDb(expand("%:p:h")) + map :call GenerateCscopeDb() +endif " close preview window after a completion if has("autocmd") autocmd CursorMovedI *.{[hc],cpp} if pumvisible() == 0|pclose|endif @@ -299,8 +305,8 @@ imap " show current changes with F9 command! DiffOrig \ vert new | set bt=nofile | r # | 0d_ | diffthis | wincmd p | diffthis -map :DiffOrig -imap a +map :DiffOrig +imap a " show git diff when committing let g:git_diff_spawn_mode = 1 if has("autocmd")