What is the easiest way to replace all occurrences of string_a with string_b while at the same time changing anything that was already string
string_a
string_b
string
You can do it with a single command as shown in my code below:
:%s/\<\(string_a\|string_b\)\>/\=strpart("string_bstring_a", 8 * ("string_b" == submatch(0)), 8)/g