How to columnate text with tabs (in vim or on the shell)
- by kine
I have a frequent need to manually manipulate tab-delimited text for data entry and other purposes, and when i do this it helps if the text is aligned properly into columns. For example (assuming 4-space tabs):
# original format
abcdefghijklmnop field2
abcdefgh field2
abcdefghijkl field2
# ideal format
abcdefghijklmnop field2
abcdefgh field2
abcdefghijkl field2
I am very familiar with using the column utility to columnate text this way, but the problem is that it uses spaces to align the columns, and i specifically need tabs. This requirement also appears to rule out the Tabularize plug-in.
Is there any way that i can columnate text with tabs specifically, either within vim or at the shell? It looks like i might be able to do it with groff/tbl, but honestly i'd rather columnate it by hand than mess with that....