diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-07-07 14:17:42 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-07-07 14:17:42 +1200 |
commit | 376f3ff8686709c23b8fe34601b6b660005e79e0 (patch) | |
tree | 075864395e1abf3c52217a23050fb7a6da761d8c /vim/indent | |
parent | Simplify POD Vim indenting behaviour (diff) | |
download | dotfiles-376f3ff8686709c23b8fe34601b6b660005e79e0.tar.gz dotfiles-376f3ff8686709c23b8fe34601b6b660005e79e0.zip |
Simplify Vim Perl shiftwidth calculation
This is a portable method that will work on very old Vims.
Diffstat (limited to 'vim/indent')
-rw-r--r-- | vim/indent/perl.vim | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/vim/indent/perl.vim b/vim/indent/perl.vim index d03735a4..91cc9e17 100644 --- a/vim/indent/perl.vim +++ b/vim/indent/perl.vim @@ -87,10 +87,9 @@ function! GetPerlIndent(lnum) let l:pi = indent(l:pn) " Get value of 'shiftwidth' - let l:sw = exists('*shiftwidth') - \ ? shiftwidth() - \ : &shiftwidth || &tabstop - + let l:sw = &shiftwidth + \ ? &shiftwidth + \ : &tabstop " Get current line properties let l:cl = getline(a:lnum) |