Quantcast
Viewing all articles
Browse latest Browse all 49

Answer by blacktide for 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"

Viewing all articles
Browse latest Browse all 49

Trending Articles