diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2019-09-04 16:04:21 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2019-09-04 16:04:21 +0200 |
commit | 933e42ea1f2d615c8ce5aa6daa2994e6369de3cf (patch) | |
tree | dd8398c36a6645585288247283f7cc52934268e4 /after | |
parent | cdd6d73e39c85feccdcace5c32b375de7ba25bae (diff) | |
download | vim-polyglot-933e42ea1f2d615c8ce5aa6daa2994e6369de3cf.tar.gz vim-polyglot-933e42ea1f2d615c8ce5aa6daa2994e6369de3cf.zip |
Change provider for puppet, closes #424
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 |