add method tab shortcut

Sun, 23 Oct 2016 02:31:27 -0400

author
Meredith Howard <mhoward@roomag.org>
date
Sun, 23 Oct 2016 02:31:27 -0400
changeset 425
e23906d13a57
parent 424
3f116b7f4d3e
child 426
4fcad88dbe5f

add method tab 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,4 +1,5 @@
 if exists(':Tabularize')
   AddTabularPattern! first_eq    /^[^=]*\zs=/
   AddTabularPattern! first_arrow /^.\{-}\zs=>/
+  AddTabularPattern! methods     /->\|\\./l1r0
 endif
--- a/.vimrc
+++ b/.vimrc
@@ -175,6 +175,7 @@ nmap gKK :call ViewDoc('doc', expand('%'
 " Tabular shortcuts
 map <leader>te :Tabularize first_eq<CR>
 map <leader>ta :Tabularize first_arrow<CR>
+map <leader>tm :Tabularize methods<CR>
 
 function! AutoFmtToggle()
   if &formatoptions =~ 'a'

mercurial