How do I specify “the word under the cursor” on VIM's commandline?

前端 未结 8 965
后悔当初
后悔当初 2021-01-30 02:14

I want to write a command that specifies \"the word under the cursor\" in VIM. For instance, let\'s say I have the cursor on a word and I make it appear twice. For instance, i

8条回答
  •  粉色の甜心
    2021-01-30 02:40

    While in command-line mode, CTRL+R CTRL+W will insert the word under the cursor.

    See the help for c_CTRL-R for a listing of all the other special registers:

    :help c_CTRL-R
    

提交回复
热议问题