diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-08-11 19:50:37 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-08-11 19:50:37 +0200 |
commit | 1ccd8fff8acfbd5df0fc0e9b4d288af84e51233e (patch) | |
tree | 909b2433229aa72e87bd9d23bd88db9e1e8a9f57 /runtime/indent | |
parent | 05aafed54b50b602315ae55d83a7d089804cecb0 (diff) | |
download | vim-1ccd8fff8acfbd5df0fc0e9b4d288af84e51233e.zip |
Update runtime files.
Diffstat (limited to 'runtime/indent')
-rw-r--r-- | runtime/indent/sh.vim | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/indent/sh.vim b/runtime/indent/sh.vim index ae4f4b53c..fd9a6a9c9 100644 --- a/runtime/indent/sh.vim +++ b/runtime/indent/sh.vim @@ -3,10 +3,11 @@ " Maintainer: Christian Brabandt <cb@256bit.org> " Previous Maintainer: Peter Aronoff <telemachus@arpinum.org> " Original Author: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2017-05-02 +" Latest Revision: 2017-08-08 " License: Vim (see :h license) " Repository: https://github.com/chrisbra/vim-sh-indent " Changelog: +" 20170808: - better indent of line continuation " 20170502: - get rid of buffer-shiftwidth function " 20160912: - preserve indentation of here-doc blocks " 20160627: - detect heredocs correctly @@ -117,7 +118,8 @@ function! GetShIndent() endfunction function! s:is_continuation_line(line) - return a:line =~ '\%(\%(^\|[^\\]\)\\\|&&\|||\)$' + return a:line =~ '\%(\%(^\|[^\\]\)\\\|&&\|||\||\)' . + \ '\s*\({\s*\)\=\(#.*\)\=$' endfunction function! s:find_continued_lnum(lnum) |