In order to replace each occurrence of “&” to “&&” in the range from the current line to 30 more lines on, I issue :.,+30s/\\&/\\&\\&/g but Vim says “Pattern not found”. I’m escaping the special character “&” by double backslash “\”.
In order to replace each occurrence of & to && in the range from
Share
Try not escaping everything –
:.,+30s/&/&&/gseems to work for me.