Change puppet vendor, closes #24

This commit is contained in:
Adam Stankiewicz
2014-04-15 01:26:34 +02:00
parent 6c198a3ca9
commit b36260d015
6 changed files with 98 additions and 164 deletions

11
after/ftplugin/puppet.vim Normal file
View File

@@ -0,0 +1,11 @@
inoremap <buffer> <silent> > ><Esc>:call <SID>puppetalign()<CR>A
function! s:puppetalign()
let p = '^\s*\w+\s*[=+]>.*$'
let lineContainsHashrocket = getline('.') =~# '^\s*\w+\s*[=+]>'
let hashrocketOnPrevLine = getline(line('.') - 1) =~# p
let hashrocketOnNextLine = getline(line('.') + 1) =~# p
if exists(':Tabularize') " && lineContainsHashrocket && (hashrocketOnPrevLine || hashrocketOnNextLine)
Tabularize /=>/l1
normal! 0
endif
endfunction