From 933e42ea1f2d615c8ce5aa6daa2994e6369de3cf Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Wed, 4 Sep 2019 16:04:21 +0200 Subject: Change provider for puppet, closes #424 --- after/ftplugin/puppet.vim | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'after') 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 > >:call puppetalign()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 => =>:call puppet#align#AlignHashrockets()$a endif -- cgit v1.2.3