summaryrefslogtreecommitdiffstats
path: root/.config/nvim/after/plugin/tabular_extra.vim
blob: 28713ca03b2d4effe93509c8a71e59d9f5bbd5cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
" after/plugin/my_tabular_commands.vim
" Provides extra :Tabularize commands

if !exists(':Tabularize')
  finish " Give up here; the Tabular plugin musn't have been loaded
endif

nmap <Leader>t= :Tabularize /=<CR>
vmap <Leader>t= :Tabularize /=<CR>
nmap <Leader>t: :Tabularize /:\zs<CR>
vmap <Leader>t: :Tabularize /:\zs<CR>

AddTabularPattern first_comma /^[^,]*\zs,/r0c0l0
AddTabularPattern first_colon /^[^:]*\zs:/r0c0l0