Skip to content
Discussion options

You must be logged in to vote

Sure, there are several ways you can do that with standard vim motions:

  1. Assuming your cursor is on the start of the first word, you can press sa4e", which will add a surrounding (sa) around the current position and the end of the next four words (4e) using quotation marks ("). If you are unsure of how many words, you could do veeeesa", which will give you visual feedback on the words you are going to place quotes around.
  2. If your cursor was not at the start of the first word, but in the middle, you could use the "around word" textobject, but you'll have to back off by one character, so you don't quote an empty space at the end. Because you need to adjust the selection, you'll want to use …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@acid-bong
Comment options

Answer selected by proofer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants