ciw (change inner word)
What is ciw (change inner word)?
ciw (change inner word): Vim: delete the word under the cursor and drop straight into insert mode to retype it. In Vim, ciw means change inner word. It deletes the word under the cursor and puts you in insert mode, ready to type the replacement. The cursor can be anywhere in the word. It is a good example of how Vim commands combine. c means change, i means inner, and w means word. Swap the parts and you get related commands: diw deletes the word, ci" changes everything inside the quotes, and ci( changes everything inside the brackets.
Frequently asked questions about ciw (change inner word)
What should you keep in mind with ciw (change inner word)?
Once this grammar clicks, editing becomes a matter of describing what you want instead of selecting text with the mouse. Many editors offer a Vim mode, such as VSCodeVim or IdeaVim, so you can use these commands without leaving your usual editor.
At a glance
| Category | Keyboard shortcuts |
|---|---|
| Explained by | Reinier de la Parra |
| Updated |