diff options
Diffstat (limited to 'after')
-rw-r--r-- | after/ftplugin/puppet.vim | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/after/ftplugin/puppet.vim b/after/ftplugin/puppet.vim index 1265038b..934e4b03 100644 --- a/after/ftplugin/puppet.vim +++ b/after/ftplugin/puppet.vim @@ -6,15 +6,6 @@ if !exists('g:puppet_align_hashes') let g:puppet_align_hashes = 1 endif -if g:puppet_align_hashes && exists(':Tabularize') - inoremap <buffer> <silent> > ><Esc>:call <SID>puppetalign()<CR>a - function! s:puppetalign() - let p = '^\s*\w+\s*[=+]>.*$' - let column = strlen(substitute(getline('.')[0:col('.')],'\([^=]\|=[^>]\)','','g')) - let position = strlen(matchstr(getline('.')[0:col('.')],'.*=>\s*\zs.*')) - Tabularize /=>/l1 - normal! 0 - echo repeat('\([^=]\|=[^>]\)*=>',column).'\s\{-\}'.repeat('.',position) - call search(repeat('\([^=]\|=[^>]\)*=>',column).'\s\{-\}'.repeat('.',position),'ce',line('.')) - endfunction +if g:puppet_align_hashes + inoremap <buffer> <silent> => =><Esc>:call puppet#align#AlignHashrockets()<CR>$a endif |