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/
Written by Travis Brack
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Regex
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#