3
I know there's probably a way to do that using regex, but I can't quite seem to figure out regex in vim. I tried searching: /-\{2}
but it catches triple hyphens, too.
I also can't just do a traditional find and replace, since I have triple hyphens in my file. Searching for --
returns triple hyphens in addition to double hyphens.
2Did you try
:%s/--/---/g
? It works for me. – Tomer Vromen – 2012-02-18T23:27:11.727I should have said that my file also contains triple hyphens, so if I do that, I would get triple hyphens turning into quadruple hyphens. – Jonathan – 2012-02-19T18:54:19.127