From 292f741bb1a37db52b8e0509d95a7ad992e47968 Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Mon, 4 Mar 2013 17:05:25 +0100 Subject: [PATCH] [vim] cleaning .vimrc --- .vimrc | 43 +++++-------------------------------------- 1 file changed, 5 insertions(+), 38 deletions(-) diff --git a/.vimrc b/.vimrc index e82df6f..32d3069 100644 --- a/.vimrc +++ b/.vimrc @@ -13,7 +13,7 @@ " M-F8 build kernel ctags/cscope databases " S-F9 build cscope in .vim/cscope " F9 Search cscopeDB in .vim/cscope -" M-F9 diff tool +" M-F10 diff tool " F10 folding " F11 unhighlight search " F12 paste mode @@ -162,7 +162,6 @@ endif " SEARCH " """""""""" - " highlight search set hlsearch " unhighlight current search @@ -208,6 +207,8 @@ let Tlist_Display_Tag_Scope = 0 let Tlist_Show_One_File = 1 let Tlist_Compact_Format = 1 let Tlist_Enable_Fold_Column = 0 +" sort by name or order ? +let Tlist_Sort_Type = "name" "let Tlist_File_Fold_Auto_Close = 1 let Tlist_Inc_Winwidth = 0 "let Tlist_Use_Horiz_Window = 1 @@ -216,41 +217,7 @@ let Tlist_Use_Right_Window = 1 map :TlistToggle -" cat Makefile | grep '\-I\/' | tr '[:space:]' '\n' | grep '\-I/' | sort -u | tr '\n' ' ' -" build tags database with shift+F8 or alt+F8 to ignore /usr/include -" --c++-kinds=+p : Adds prototypes in the database for C/C++ files. -" --fields=+iaS : Adds inheritance (i), access (a) and function -" signatures (S) information. -" --extra=+q : Adds context to the tag name. Note: Without this -" option, the script cannot get class members. -command! CtagsBuild - \ :!echo 'building ctags database...' ; - \ ctags --fields=+iaS --extra=+q --totals -R --c++-kinds=+p && - \ echo 'adding system headers...' ; - \ find -exec gcc -M '{}' \; 2>&- | tr '[:space:]' '\n' | grep '^/.*' | sort -u | - \ ctags --c-kinds=+px --c++-kinds=+px --fields=+iaS --extra=+q -aL- -command! CtagsKernelBuild - \ :!echo 'building ctags database in kernel mode...' ; - \ ctags --fields=+iaS --extra=+q --totals -R --c++-kinds=+p -command! CscopeBuild - \ :!echo 'building cscope database...' ; - \ cscope -bR -command! CscopeKernelBuild - \ :!echo 'building cscope database in kernel mode...' ; - \ cscope -bkR -if has("cscope") - map :CtagsBuild:CscopeBuild:cscope reset:cscope add cscope.out - map :CtagsKernelBuild:CscopeKernelBuild:cscope reset:cscope add cscope.out -else - map :CtagsBuild - 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 @@ -351,8 +318,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")