Last Updated: February 25, 2016
·
474
· tlbrack

using regex in vim subtitute command

Wrap your captures in escapes parentheses, then use a 1 based index to refer to the captures in the replacement section. Basically something like:

%s/blarg \(capture 1\) \(capture 2\)/replaced with flipped blarg \2 \1/