diff runtime/indent/sh.vim @ 12045:444ad56c0cac

Update runtime files. commit https://github.com/vim/vim/commit/1ccd8fff8acfbd5df0fc0e9b4d288af84e51233e Author: Bram Moolenaar <Bram@vim.org> Date: Fri Aug 11 19:50:37 2017 +0200 Update runtime files.
author Christian Brabandt <cb@256bit.org>
date Fri, 11 Aug 2017 20:00:05 +0200
parents d183d629509e
children a9fdf01085a8
line wrap: on
line diff
--- 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)