aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-07-07 14:18:24 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-07-07 14:19:27 +1200
commit343553c05b647cf9716eb9bd44cf023fac61fc61 (patch)
treef83292346d86ce979b4bc8aaf8957949351627ea
parentSimplify Vim Perl shiftwidth calculation (diff)
downloaddotfiles-343553c05b647cf9716eb9bd44cf023fac61fc61.tar.gz
dotfiles-343553c05b647cf9716eb9bd44cf023fac61fc61.zip
Refine Perl line cont hints in Vim indent
-rw-r--r--vim/indent/perl.vim8
1 files changed, 4 insertions, 4 deletions
diff --git a/vim/indent/perl.vim b/vim/indent/perl.vim
index 91cc9e17..f02f2a65 100644
--- a/vim/indent/perl.vim
+++ b/vim/indent/perl.vim
@@ -8,7 +8,7 @@ let b:did_indent = 1
" Indent settings
setlocal indentexpr=GetPerlIndent(v:lnum)
-setlocal indentkeys=o,O,0=,0=},0=),0=],&,<Bar>,<Space>
+setlocal indentkeys=o,O,0=,0=},0=),0=],0=&&,0=\|\|,0=//,0=?,0=:,<Space>
" Build patterns for heredoc indenting; note that we detect indented heredocs
" with tildes like <<~EOF, but we don't treat them any differently; note also
@@ -117,9 +117,9 @@ function! GetPerlIndent(lnum)
" Line continuation hints
elseif l:pl =~# '[^])},]\s*$'
- \ || l:cl =~# '^\s*\(and\|or\)\>'
- \ || l:cl =~# '^\s*\(&&\|||\)'
- \ || l:cl =~# '^\s*='
+ \ || l:cl =~# '^\s*\(and\|or\|xor\)'
+ \ || l:cl =~# '^\s*\(&&\|||\|//\)'
+ \ || l:cl =~# '^\s*[?:=]'
return l:pb + l:sw / 2
" Default to indent of previous line