Answer the question
In order to leave comments, you need to log in
vim. Selected number of lines. How to replace at the beginning and end of each selected line?
Important!
You need a command like: :s/.../.../
, which can be put on a keyboard shortcut. The working option, if you enter the command manually is: :s/^\s*/&<-- / | '<,'>s/$/ -->/
, but if this command is mapped into vimrc, then it only works up to the logical "and" ( | ).
Can anyone suggest a solution?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question