Reputation: 15608
Is there a way to use the word under the cursor in a cscope
search in Vim?
If the cursor is over a variable Foo
and I want to avoid needing to type Foo
again in the command line but would like to assemble :cs f s Foo
.
Is there any way I can automate it?
Upvotes: 2
Views: 626
Reputation: 94511
Use CTRL-R CTRL-W to copy the word under cursor to the command line:
:cs f s <C-R><C-W>
See the documentation for more information.
Upvotes: 7