I already know how to do this with
:%s/\(\S\+\)^I\(\S\+\)/\2^I\1/
but I feel like I'm picking up a lot. Is there a cleaner and faster way to do this?
If the columns are lined up, you can use the visual block mode by pressing Ctrl + V, then cut and paste. If the columns are not aligned, first increase the tab width so that it is larger than the contents of the columns in question.
The best way to do this in VIM is not to do it with VIM and (re) use existing tools to work. * NIX solution:
:%!awk -F \\t '{print $2 FS $1}'
awk, , , (FS). awk Windows.
awk
P.S. cut, - cut -f 2,1 (-d , TAB ) , : |
cut
cut -f 2,1
Source: https://habr.com/ru/post/1751780/More articles:R: Creating CSV from serialized objects - serializationGet request of type of general type in method - javaThe easiest way to reuse a function without instantiating a new class is c #Как замаскировать текущую страницу за модальным диалоговым окном в ванильном GWT? - user-interfaceSet rs = nothing: useful before closing the form? - access-vbaOffset animation with jquery - jqueryExtension JS - javascriptPhotoshop Automation "Save Online" - javascriptHow to use git diff only for diff.cs files - githttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1751785/whats-the-best-way-to-get-a-copy-of-the-tip-of-a-mercurial-repository&usg=ALkJrhhfEPJ7Rv9OUkszi-N28TnCu4aL4wAll Articles