I really like vim, and here’s yet another reason. I can transpose columns in a text table, using visual block mode. As a quick example, let’s say I have a file containing usernames and display names. If I want to switch the order of the columns, here are the steps:
- enable virtualedit: set virtualedit=all
- move to the upper-left corner of a column I want to select
- invoke visual block mode: CTRL-V (CTRL-Q if CTRL-V is mapped to Paste)
- move the cursor (h,j,k,l or shift-arrow) to select the column
- delete the selection: x
- move the cursor to the location where I want to insert the column. (Note that with virtualedit enabled, I can move beyond the actual end of a line)
- paste the column: p