Skip to content

Commit

Permalink
Be more liberal with noticing continuations
Browse files Browse the repository at this point in the history
- Accept pipe as a continuation character
- Accept braces and comments after continuation characters
  • Loading branch information
Genki Sky authored and chrisbra committed Aug 8, 2017
1 parent 8da66a5 commit e4a0442
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion indent/sh.vim
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,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)
Expand Down

0 comments on commit e4a0442

Please sign in to comment.