How to replace a single word under cursor?

后端 未结 5 1560
广开言路
广开言路 2021-01-29 18:38

How do I replace a word under the cursor in Vim.

So instead of using dw then i then the word and then Esc, is there a simpler com

5条回答
  •  悲&欢浪女
    2021-01-29 19:27

    ciw
    

    (change inner word) will change the whole word under the cursor. Compare with

    cw
    

    which will only change the word from the current cursor position. For more info see this SO question/answer.

提交回复
热议问题