diff options
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 |