aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-07-07 16:20:10 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-07-07 16:20:10 +1200
commitcfe63deaca1c593c5af8c24b78d7338f5cce21ff (patch)
tree3c2d898d7c9c13ce5299a731f50ae82761c585d4
parentMerge branch 'release/v1.23.0' into develop (diff)
parentUpdate dotfiles(7) manual (diff)
downloaddotfiles-cfe63deaca1c593c5af8c24b78d7338f5cce21ff.tar.gz
dotfiles-cfe63deaca1c593c5af8c24b78d7338f5cce21ff.zip
Merge branch 'hotfix/v1.23.1' into develop
* hotfix/v1.23.1: Update dotfiles(7) manual Bump VERSION Simplify in/out indent for blocks
-rw-r--r--VERSION4
-rw-r--r--man/man7/dotfiles.7df10
-rw-r--r--vim/indent/perl.vim38
3 files changed, 26 insertions, 26 deletions
diff --git a/VERSION b/VERSION
index c55e22ec..7bc1fd01 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-tejr dotfiles v1.23.0
-Sat Jul 7 03:31:48 UTC 2018
+tejr dotfiles v1.23.1
+Sat Jul 7 04:16:46 UTC 2018
diff --git a/man/man7/dotfiles.7df b/man/man7/dotfiles.7df
index 7c4d410e..1e9c1e02 100644
--- a/man/man7/dotfiles.7df
+++ b/man/man7/dotfiles.7df
@@ -496,16 +496,10 @@ structures like functions, I like to implement it as a plugin in
documentation for each in \f[C]~/.vim/doc\f[].
.PP
They eventually get either discarded or spun off into their own
-repositories, added to this repository as submodules instead, and
-uploaded to
+repositories, added to this repository as submodules under
+\f[C]vim/bundle\f[] instead, and uploaded to
vim.org (https://www.vim.org/account/profile.php?user_id=73687).
.PP
-In the current version, there are no local plugins; everything's got its
-own repository.
-All plugins and colorschemes are available as submodules in
-\f[C]~/.vim/bundle\f[].
-They are installed into \f[C]~/.vim\f[].
-.PP
I still use two third\-party plugins: Tim Pope's
repeat.vim (https://www.vim.org/scripts/script.php?script_id=2136) and
surround.vim (https://www.vim.org/scripts/script.php?script_id=1697).
diff --git a/vim/indent/perl.vim b/vim/indent/perl.vim
index cd01f30b..aac8f818 100644
--- a/vim/indent/perl.vim
+++ b/vim/indent/perl.vim
@@ -83,36 +83,42 @@ function! GetPerlIndent(lnum)
let l:pl = getline(l:pn)
let l:pi = indent(l:pn)
- " Get value of 'shiftwidth'
- let l:sw = &shiftwidth ? &shiftwidth : &tabstop
+ " Just follow comment indent
+ if l:pl =~# '^\s*#'
+ return l:pi
+ endif
" Get current line properties
let l:cl = getline(a:lnum)
+ " Get value of 'shiftwidth'
+ let l:sw = &shiftwidth ? &shiftwidth : &tabstop
+
" Base indent with any fractional indent removed
let l:pb = l:pi - l:pi % l:sw
- " Just follow comment indent
- if l:pl =~# '^\s*#'
- return l:pi
-
- " Move out with closing brace
- elseif l:cl =~# '^\s*[])}]'
- return l:pb >= l:sw ? l:pb - l:sw : 0
-
- " Move in after opening brace
- elseif l:pl =~# '[{([]\s*$'
- return l:pb + l:sw
+ " Handle open and closing brackets
+ let l:open = l:pl =~# '[{([]\s*$'
+ let l:shut = l:cl =~# '^\s*[])}]'
+ if l:open || l:shut
+ let l:in = l:pb
+ if l:open
+ let l:in = l:in + l:sw
+ endif
+ if l:shut
+ let l:in = l:in - l:sw
+ endif
+ return l:in > 0 ? l:in : 0
+ endif
" Never continue after a semicolon or a double-underscore
- elseif l:pl =~# '\;\s*$'
+ if l:pl =~# '\;\s*$'
\ || l:pl =~# '__DATA__'
\ || l:pl =~# '__END__'
return l:pb
" Line continuation hints
- elseif l:pl =~# '[^])},]\s*$'
- \ || l:cl =~# '^\s*\(and\|or\|xor\)'
+ elseif l:cl =~# '^\s*\(and\|or\|xor\)'
\ || l:cl =~# '^\s*\(&&\|||\|//\)'
\ || l:cl =~# '^\s*[?:=]'
return l:pb + l:sw / 2