From 50552e380cc36eb7c6223d9c5ac33b7b27b73521 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Mon, 1 Feb 2010 13:50:46 +0100 Subject: Update cscope_maps to use Ctrl-t instead of Ctrl-\ This is more convenient on de_CH keyboards :-) --- .vim/plugin/cscope_maps.vim | 61 +++++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/.vim/plugin/cscope_maps.vim b/.vim/plugin/cscope_maps.vim index c577b45..c46c704 100644 --- a/.vim/plugin/cscope_maps.vim +++ b/.vim/plugin/cscope_maps.vim @@ -1,11 +1,11 @@ """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" CSCOPE settings for vim +" CSCOPE settings for vim """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " " This file contains some boilerplate settings for vim's cscope interface, " plus some keyboard mappings that I've found useful. " -" USAGE: +" USAGE: " -- vim 6: Stick this file in your ~/.vim/plugin directory (or in a " 'plugin' directory in some other directory that is in your " 'runtimepath'. @@ -13,7 +13,7 @@ " -- vim 5: Stick this file somewhere and 'source cscope.vim' it from " your ~/.vimrc file (or cut and paste it into your .vimrc). " -" NOTE: +" NOTE: " These key maps use multiple keystrokes (2 or 3 keys). If you find that vim " keeps timing you out before you can complete them, try changing your timeout " settings, as explained below. @@ -25,7 +25,7 @@ " This tests to see if vim was configured with the '--enable-cscope' option -" when it was compiled. If it wasn't, time to recompile vim... +" when it was compiled. If it wasn't, time to recompile vim... if has("cscope") """"""""""""" Standard cscope/vim boilerplate @@ -39,14 +39,14 @@ if has("cscope") " add any cscope database in current directory if filereadable("cscope.out") - cs add cscope.out - " else add the database pointed to by environment variable + cs add cscope.out + " else add the database pointed to by environment variable elseif $CSCOPE_DB != "" cs add $CSCOPE_DB endif " show msg when any other cscope db added - set cscopeverbose + set cscopeverbose """"""""""""" My cscope/vim key mappings @@ -85,17 +85,18 @@ if has("cscope") " To do the first type of search, hit 'CTRL-\', followed by one of the " cscope search types above (s,g,c,t,e,f,i,d). The result of your cscope " search will be displayed in the current window. You can use CTRL-T to - " go back to where you were before the search. + " go back to where you were before the search. " - nmap s :cs find s =expand("") - nmap g :cs find g =expand("") - nmap c :cs find c =expand("") - nmap t :cs find t =expand("") - nmap e :cs find e =expand("") - nmap f :cs find f =expand("") - nmap i :cs find i ^=expand("")$ - nmap d :cs find d =expand("") + " Replaced C-\ by C-t -- tklauser 20090221 + nmap s :cs find s =expand("") + nmap g :cs find g =expand("") + nmap c :cs find c =expand("") + nmap t :cs find t =expand("") + nmap e :cs find e =expand("") + nmap f :cs find f =expand("") + nmap i :cs find i ^=expand("")$ + nmap d :cs find d =expand("") " Using 'CTRL-spacebar' (intepreted as CTRL-@ by vim) then a search type @@ -104,19 +105,19 @@ if has("cscope") " " (Note: earlier versions of vim may not have the :scs command, but it " can be simulated roughly via: - " nmap s :cs find s =expand("") + " nmap s :cs find s =expand("") - nmap s :scs find s =expand("") - nmap g :scs find g =expand("") - nmap c :scs find c =expand("") - nmap t :scs find t =expand("") - nmap e :scs find e =expand("") - nmap f :scs find f =expand("") - nmap i :scs find i ^=expand("")$ - nmap d :scs find d =expand("") + nmap s :scs find s =expand("") + nmap g :scs find g =expand("") + nmap c :scs find c =expand("") + nmap t :scs find t =expand("") + nmap e :scs find e =expand("") + nmap f :scs find f =expand("") + nmap i :scs find i ^=expand("")$ + nmap d :scs find d =expand("") - " Hitting CTRL-space *twice* before the search type does a vertical + " Hitting CTRL-space *twice* before the search type does a vertical " split instead of a horizontal one (vim 6 and up only) " " (Note: you may wish to put a 'set splitright' in your .vimrc @@ -127,8 +128,8 @@ if has("cscope") nmap c :vert scs find c =expand("") nmap t :vert scs find t =expand("") nmap e :vert scs find e =expand("") - nmap f :vert scs find f =expand("") - nmap i :vert scs find i ^=expand("")$ + nmap f :vert scs find f =expand("") + nmap i :vert scs find i ^=expand("")$ nmap d :vert scs find d =expand("") @@ -138,7 +139,7 @@ if has("cscope") " You may find that too short with the above typemaps. If so, you should " either turn off mapping timeouts via 'notimeout'. " - "set notimeout + "set notimeout " " Or, you can keep timeouts, by uncommenting the timeoutlen line below, " with your own personal favorite value (in milliseconds): @@ -151,7 +152,7 @@ if has("cscope") " delays as vim waits for a keystroke after you hit ESC (it will be " waiting to see if the ESC is actually part of a key code like ). " - "set ttimeout + "set ttimeout " " personally, I find a tenth of a second to work well for key code " timeouts. If you experience problems and have a slow terminal or network -- cgit v1.2.3-54-g00ecf