aboutsummaryrefslogtreecommitdiff
path: root/vim/indent
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-07-07 14:17:42 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-07-07 14:17:42 +1200
commit376f3ff8686709c23b8fe34601b6b660005e79e0 (patch)
tree075864395e1abf3c52217a23050fb7a6da761d8c /vim/indent
parent4d3ec71335a338a5362a073099e6039d72fef416 (diff)
downloaddotfiles-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.vim7
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)