Skip to content

Instantly share code, notes, and snippets.

@romainl
Last active August 4, 2023 07:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save romainl/6575382f1c4575d4a7398d162aa3e1fd to your computer and use it in GitHub Desktop.
Save romainl/6575382f1c4575d4a7398d162aa3e1fd to your computer and use it in GitHub Desktop.
Ultra lightweight aligning
" Use a bunch of standard UNIX commands for quick an dirty
" whitespace-based alignment
function! Align()
'<,'>!column -t|sed 's/ \(\S\)/ \1/g'
normal gv=
endfunction
xnoremap <silent> <key> :<C-u>silent call Align()<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment