Vim Scoops / Lessons / Change inside quotes

How to change text inside quotes in Vim

Press ci" to delete everything inside the quotes and start typing. The cursor can be anywhere on the line before the quotes, not just inside them.

The keys

KeysWhat they do
ci" / ci'Change inside double / single quotes
ci( or cibChange inside ( )
ci{ or ciBChange inside { }
ciwChange the word under the cursor
ca"Change the quotes as well

Read it as change inside quotes. The same objects work with other operators: di( empties brackets, and yi" copies a string.

Press Esc when you've finished typing, and . can do the same change on the next string.

Related

Want all of Vim, in order? Vim Scoops is a free game that starts at h j k l and builds up to macros.

Play the full game