In Vim, how can I delete everything between quotes including the quotes?

You can use the following sequence to delete everything including the quotes:

da"

Keep in mind this only works on a single line, and will remove any trailing spaces after the last quote.

As pointed out by @James in the comments below, you can also use the delete inside sequence to delete the characters within the quotes without deleting the quotes:

di"

You can also use the change inside sequence to remove the characters and switch to insert mode, allowing you to easily replace text within quotes:

ci"

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)