Quote Text Objects

i" / a" / i' / a' โ€” operate on a quoted string without finding its boundaries.

Keys: i", a", i', a', i`, a`

i" is the contents of the surrounding double-quoted string. a" includes the quotes themselves. Same for ' and `.

Editing a string literal? Cursor anywhere inside it. ci" blanks the contents and drops you in to type the new ones. da" removes the quotes and contents together.

Change inside double quotes
KeyNote
c
i
"
Delete the quoted string AND the quotes
KeyNote
d
a
"
Visual-select inside single quotes
KeyNote
v
i
'
Yank inside backticks
KeyNote
y
i
`
i" / a" โ€” double quotes
i' / a' โ€” single quotes
i / a โ€” backticks

Reference

Object Range
i" Contents of "โ€ฆ" (excluding quotes)
a" "โ€ฆ" including the quotes
i' / a' Same for 'โ€ฆ'
i` / a` Same for โ€ฆ

Worked example โ€” ci" and ca"

Operate on whatever is in the quotes.

Step 1 ยท Cursor inside the string.
Cursor inside the string.
Step 2 ยท ci" ยท ci" โ€” string contents gone.
ci" โ€” string contents gone.

You don't need to be on a quote โ€” Vim finds the surrounding pair on the line. Same for ', `, (), [], {}, <>, t (tag).

โ–ถ Try this in the simulator

See also: Inner Word vs A Word, Bracket Text Objects, The Vim Grammar