Permalink
Browse files

Align plussignment as well

Puppet also has the '+>' operator (which is useful for metaparameters)
  • Loading branch information...
1 parent b71d92a commit 4c2acfc39b80fc0b94b0c9a2ccded9534cdaf9bc @evaryont evaryont committed Feb 23, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 after/ftplugin/puppet.vim
@@ -1,7 +1,7 @@
inoremap <buffer> <silent> > ><Esc>:call <SID>puppetalign()<CR>A
function! s:puppetalign()
- let p = '^\s*\w+\s*=>.*$'
- let lineContainsHashrocket = getline('.') =~# '^\s*\w+\s*=>'
+ 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)

0 comments on commit 4c2acfc

Please sign in to comment.