summaryrefslogtreecommitdiff
path: root/.vim/plugin/cscope_maps.vim
diff options
context:
space:
mode:
Diffstat (limited to '.vim/plugin/cscope_maps.vim')
-rw-r--r--.vim/plugin/cscope_maps.vim61
1 files 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 <C-\>s :cs find s <C-R>=expand("<cword>")<CR><CR>
- nmap <C-\>g :cs find g <C-R>=expand("<cword>")<CR><CR>
- nmap <C-\>c :cs find c <C-R>=expand("<cword>")<CR><CR>
- nmap <C-\>t :cs find t <C-R>=expand("<cword>")<CR><CR>
- nmap <C-\>e :cs find e <C-R>=expand("<cword>")<CR><CR>
- nmap <C-\>f :cs find f <C-R>=expand("<cfile>")<CR><CR>
- nmap <C-\>i :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
- nmap <C-\>d :cs find d <C-R>=expand("<cword>")<CR><CR>
+ " Replaced C-\ by C-t -- tklauser 20090221
+ nmap <C-t>s :cs find s <C-R>=expand("<cword>")<CR><CR>
+ nmap <C-t>g :cs find g <C-R>=expand("<cword>")<CR><CR>
+ nmap <C-t>c :cs find c <C-R>=expand("<cword>")<CR><CR>
+ nmap <C-t>t :cs find t <C-R>=expand("<cword>")<CR><CR>
+ nmap <C-t>e :cs find e <C-R>=expand("<cword>")<CR><CR>
+ nmap <C-t>f :cs find f <C-R>=expand("<cfile>")<CR><CR>
+ nmap <C-t>i :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
+ nmap <C-t>d :cs find d <C-R>=expand("<cword>")<CR><CR>
" 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 <C-@>s <C-W><C-S> :cs find s <C-R>=expand("<cword>")<CR><CR>
+ " nmap <C-@>s <C-W><C-S> :cs find s <C-R>=expand("<cword>")<CR><CR>
- nmap <C-@>s :scs find s <C-R>=expand("<cword>")<CR><CR>
- nmap <C-@>g :scs find g <C-R>=expand("<cword>")<CR><CR>
- nmap <C-@>c :scs find c <C-R>=expand("<cword>")<CR><CR>
- nmap <C-@>t :scs find t <C-R>=expand("<cword>")<CR><CR>
- nmap <C-@>e :scs find e <C-R>=expand("<cword>")<CR><CR>
- nmap <C-@>f :scs find f <C-R>=expand("<cfile>")<CR><CR>
- nmap <C-@>i :scs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
- nmap <C-@>d :scs find d <C-R>=expand("<cword>")<CR><CR>
+ nmap <C-@>s :scs find s <C-R>=expand("<cword>")<CR><CR>
+ nmap <C-@>g :scs find g <C-R>=expand("<cword>")<CR><CR>
+ nmap <C-@>c :scs find c <C-R>=expand("<cword>")<CR><CR>
+ nmap <C-@>t :scs find t <C-R>=expand("<cword>")<CR><CR>
+ nmap <C-@>e :scs find e <C-R>=expand("<cword>")<CR><CR>
+ nmap <C-@>f :scs find f <C-R>=expand("<cfile>")<CR><CR>
+ nmap <C-@>i :scs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
+ nmap <C-@>d :scs find d <C-R>=expand("<cword>")<CR><CR>
- " 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-@><C-@>c :vert scs find c <C-R>=expand("<cword>")<CR><CR>
nmap <C-@><C-@>t :vert scs find t <C-R>=expand("<cword>")<CR><CR>
nmap <C-@><C-@>e :vert scs find e <C-R>=expand("<cword>")<CR><CR>
- nmap <C-@><C-@>f :vert scs find f <C-R>=expand("<cfile>")<CR><CR>
- nmap <C-@><C-@>i :vert scs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
+ nmap <C-@><C-@>f :vert scs find f <C-R>=expand("<cfile>")<CR><CR>
+ nmap <C-@><C-@>i :vert scs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
nmap <C-@><C-@>d :vert scs find d <C-R>=expand("<cword>")<CR><CR>
@@ -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 <F1>).
"
- "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