add first colon shortcut

Fri, 30 Dec 2016 13:23:17 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Fri, 30 Dec 2016 13:23:17 -0500
changeset 464
452034aff788
parent 463
b864784951d9
child 465
a771fe75a85c

add first colon shortcut

.vim/after/plugin/tabular.vim file | annotate | diff | comparison | revisions
.vimrc file | annotate | diff | comparison | revisions
--- a/.vim/after/plugin/tabular.vim
+++ b/.vim/after/plugin/tabular.vim
@@ -1,5 +1,6 @@
 if exists(':Tabularize')
   AddTabularPattern! first_eq    /^[^=]*\zs=/
   AddTabularPattern! first_arrow /^.\{-}\zs=>/
+  AddTabularPattern! first_colon /^.\{-}:\zs/
   AddTabularPattern! methods     /->\|\\./l1r0
 endif
--- a/.vimrc
+++ b/.vimrc
@@ -175,7 +175,7 @@ nmap gKK :call ViewDoc('doc', expand('%'
 " Tabular shortcuts
 map <leader>ta :Tabularize first_arrow<CR>
 map <leader>te :Tabularize first_eq<CR>
-map <leader>tc :Tabularize /:\zs<CR>
+map <leader>tc :Tabularize first_colon<CR>
 map <leader>tm :Tabularize methods<CR>
 
 function! AutoFmtToggle()

mercurial