diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-06-13 18:12:01 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-06-13 18:12:01 +0200 |
commit | 3ec574f2b549f456f664f689d6da36dc5719aeb9 (patch) | |
tree | 8aa7d766ebc0eb3919fdc678e6f48dd0a2b36673 /runtime/indent/perl.vim | |
parent | 2102035488e80ef6fd5038ed15d21672712ba0f6 (diff) |
Update runtime files.
Includes changing &sw to shiftwidth() for all indent scripts.
Diffstat (limited to 'runtime/indent/perl.vim')
-rw-r--r-- | runtime/indent/perl.vim | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/runtime/indent/perl.vim b/runtime/indent/perl.vim index fc4b6a30d3..cf256eae0a 100644 --- a/runtime/indent/perl.vim +++ b/runtime/indent/perl.vim @@ -3,7 +3,7 @@ " Maintainer: vim-perl <vim-perl@googlegroups.com> " Homepage: http://github.com/vim-perl/vim-perl " Bugs/requests: http://github.com/vim-perl/vim-perl/issues -" Last Change: 2013-07-24 +" Last Change: 2017 Jun 13 " Suggestions and improvements by : " Aaron J. Sherman (use syntax for hints) @@ -138,9 +138,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) @@ -152,25 +152,25 @@ function! GetPerlIndent() \ || synid == "perlMatchStartEnd" \ || synid == "perlBraces" \ || 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 |