I am working with vim-surround and the following text. (* is the place of the cursor)
This is a lo*ng line and I want to highlight two words
I want to surround both the words long and line within quotes, so that it becomes
This is a "long line" and I want to highlight two words
Is it possible to do it without getting into visual mode?
press q and q for recording into q register (we use "q" as shortcut to remember "quotes"). press a then press ' again to surround the word with quotes.
Try: ys2w"
(ys
takes a motion or text object, and then the character with which you want to surround).
Press b
first and then ys2w"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With