diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-07-07 16:18:05 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-07-07 16:18:05 +1200 |
commit | 4352aed359057a1dbcbe62ef7fc935915e2c58c0 (patch) | |
tree | 3c2d898d7c9c13ce5299a731f50ae82761c585d4 | |
parent | Merge branch 'release/v1.23.0' (diff) | |
parent | Update dotfiles(7) manual (diff) | |
download | dotfiles-1.23.1.tar.gz (sig) dotfiles-1.23.1.zip |
Merge branch 'hotfix/v1.23.1'v1.23.1
* hotfix/v1.23.1:
Update dotfiles(7) manual
Bump VERSION
Simplify in/out indent for blocks
-rw-r--r-- | VERSION | 4 | ||||
-rw-r--r-- | man/man7/dotfiles.7df | 10 | ||||
-rw-r--r-- | vim/indent/perl.vim | 38 |
3 files changed, 26 insertions, 26 deletions
@@ -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 |