VIM: swap two columns separated by space -


i have 2 columns:

cats dog   dog cats 

i want swap 2 columns:

dog cats cats dog  

using vim how this?

my first idea, substitution, ended looking birei's went awk (that don't know much) used filter:

:%!awk '{print $2, $1}' 

Comments

Popular posts from this blog

java - How to print docx and pdf? -

html - jquery - p element wont show after I hid it -

qml - Is it possible to implement SystemTrayIcon functionality in Qt Quick application -