sponsor Vim development Vim logo Vim Book Ad

basic Tip #204: Some mappings for using cscope with vim.

 tip karma   Rating 3/3, Viewed by 2121 

Read and edit this tip on the Vim tip wiki. The wiki may have a more recent version of this tip.

created:   January 28, 2002 10:38      complexity:   basic
author:   Rahul Agrawal      as of Vim:   6.0

These mappings can make using cscope a fun. You can copy the word under the cursor in one window, and search for it from other window.

" Copy and paste the word under cursor
map <silent> <C-Space> :let@m=expand("<cword>")<CR>

" Use the C-Space word as the search criterion
map <C-F6> :cscope find s <C-R>=@m<CR><CR>
map <C-F5> :cscope find c <C-R>=@m<CR><CR>
map <C-F7> :cscope find g <C-R>=@m<CR><CR>

 rate this tip  Life Changing Helpful Unfulfilling 

<< Make make more helpful | Computing a sum of numbers in vim >>

Additional Notes

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo