vim command
Vim ciw Command: Change Inner Word Quickly
Learn how to use ciw in Vim to replace words fast without manual cursor cleanup.
Published: 2026-03-09Updated: 2026-03-09
The `ciw` command is one of the fastest edits in Vim for replacing a word while staying in flow.
How ciw works
ciw combines the change operator with the inner word text object. Vim deletes the current word and switches to insert mode.
- •Use from anywhere on the word
- •Avoid selecting punctuation with inner word
- •Finish with Escape to return to normal mode
When to use it
Use ciw for variable renames, typo fixes, and repetitive refactors where speed matters more than selection precision.
Common Mistakes
- •Using cw at the middle of a word and leaving leading characters.
- •Forgetting to press Escape after insert mode.
FAQ
What is the difference between cw and ciw?
cw changes from cursor to end of word, while ciw targets the full word object.
Does ciw include surrounding whitespace?
No. ciw targets the inner word only and keeps surrounding spaces.