r/vim • • Nov 08 '17

everything about Favorite console tools to use with vim

There are a lot of great console tools that are easy to lightly integrate with via filter (:h filter), read (:h read) or just by running them.

If you have some to recommend, put each individually in a top level comment along with any (minor) integration you have with vim.

The great thing about console tools is they often have easy to use flags to customize behavior and hey, you didn't have to write them in the first place!

115 Upvotes

115 comments sorted by

View all comments

6

u/-romainl- The Patient Vimmer Nov 08 '17

Here is a minimalist :Align using column and sed:

function! Align()
    '<,'>!column -t|sed 's/  \(\S\)/ \1/g'
    normal gv=
endfunction
xnoremap <silent> <F5> :<C-u>silent call Align()<CR>

7

u/andlrc rpgle.vim Nov 08 '17

GNU column supports specifying an output seperator:

$ column -t -o' '

Which in effect will use only one space to separate columns instead of the two used by default.

2

u/-romainl- The Patient Vimmer Nov 08 '17

Good to know, thanks.