diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2014-04-15 01:26:34 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2014-04-15 01:26:34 +0200 |
commit | b36260d015c805d9b056d7e5984fcc8e20e45839 (patch) | |
tree | 69c9fb818b5b58e894246ad7c99fa483a60d9766 /indent | |
parent | 6c198a3ca9c392069c119282b702028fbfb5edf3 (diff) | |
download | vim-polyglot-b36260d015c805d9b056d7e5984fcc8e20e45839.tar.gz vim-polyglot-b36260d015c805d9b056d7e5984fcc8e20e45839.zip |
Change puppet vendor, closes #24
Diffstat (limited to 'indent')
-rw-r--r-- | indent/puppet.vim | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/indent/puppet.vim b/indent/puppet.vim index 689e0687..56ee46d5 100644 --- a/indent/puppet.vim +++ b/indent/puppet.vim @@ -1,7 +1,7 @@ " Vim indent file -" Language: Puppet -" Maintainer: Todd Zullinger <tmz@pobox.com> -" Last Change: 2009 Aug 19 +" Language: Puppet +" Maintainer: Todd Zullinger <tmz@pobox.com> +" Last Change: 2009 Aug 19 " vim: set sw=4 sts=4: if exists("b:did_indent") @@ -67,10 +67,15 @@ function! GetPuppetIndent() let ind -= &sw endif - " Match } }, }; ] ]: ) - if line =~ '^\s*\(}\(,\|;\)\?$\|]:\?$\|)\)' + " Match } }, }; ] ]: ], ]; ) + if line =~ '^\s*\(}\(,\|;\)\?$\|]:\|],\|}]\|];\?$\|)\)' let ind = indent(s:OpenBrace(v:lnum)) endif + " Don't actually shift over for } else { + if line =~ '^\s*}\s*els\(e\|if\).*{\s*$' + let ind -= &sw + endif + return ind endfunction |