Artificial intelligent assistant

Swap words in VIM without using any third party plugins Assuming that I have a file containing only of characters and numbers (no special characters or punctuation marks), how can I swap two words that may or may not be right next to each other using VIM? I tried the following (swap all occurrences of "Tom" with "Jerry") but it doesn't work for obvious reasons. ​:%s/Tom/Jerry/g​ :%s/Jerry/Tom/g Thank you!

Maybe you could use an intermediary variable like this


​:%s/Tom/XX9G235a65/g​ :%s/Jerry/Tom/g :%s/XX9G235a65/Jerry/g

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy d9348dfe71032ad814d27bc5f1d52750