diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2017-11-19 21:26:59 +0100 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2017-11-19 21:27:05 +0100 |
commit | d219055bc845253eff2b27d30a23b11b97b7ee9d (patch) | |
tree | a4586dfdbce3a304759a0c34175ee41fdede4e17 /indent/perl.vim | |
parent | 0e9041f29a3288b6685aafc63d914c11fef539ba (diff) | |
download | vim-polyglot-d219055bc845253eff2b27d30a23b11b97b7ee9d.tar.gz vim-polyglot-d219055bc845253eff2b27d30a23b11b97b7ee9d.zip |
Update
Diffstat (limited to 'indent/perl.vim')
-rw-r--r-- | indent/perl.vim | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/indent/perl.vim b/indent/perl.vim index 42cc1d01..8551e111 100644 --- a/indent/perl.vim +++ b/indent/perl.vim @@ -136,9 +136,9 @@ function! GetPerlIndent() \ || synid =~ '^perl\(Sub\|Block\|Package\)Fold' let brace = strpart(line, bracepos, 1) if brace == '(' || brace == '{' || brace == '[' - let ind = ind + &sw + let ind = ind + shiftwidth() else - let ind = ind - &sw + let ind = ind - shiftwidth() endif endif let bracepos = match(line, braceclass, bracepos + 1) @@ -151,25 +151,25 @@ function! GetPerlIndent() \ || synid == "perlBraces" \ || synid == "perlStatementIndirObj" \ || synid =~ '^perl\(Sub\|Block\|Package\)Fold' - let ind = ind - &sw + let ind = ind - shiftwidth() endif endif else if line =~ '[{[(]\s*\(#[^])}]*\)\=$' - let ind = ind + &sw + let ind = ind + shiftwidth() endif if cline =~ '^\s*[])}]' - let ind = ind - &sw + let ind = ind - shiftwidth() endif endif " Indent lines that begin with 'or' or 'and' if cline =~ '^\s*\(or\|and\)\>' if line !~ '^\s*\(or\|and\)\>' - let ind = ind + &sw + let ind = ind + shiftwidth() endif elseif line =~ '^\s*\(or\|and\)\>' - let ind = ind - &sw + let ind = ind - shiftwidth() endif return ind |