Update runtime files

This commit is contained in:
Bram Moolenaar
2019-05-09 19:16:22 +02:00
parent d4aa83af1d
commit a6c27c47dd
52 changed files with 1119 additions and 906 deletions

View File

@ -47,7 +47,7 @@ endif
function! GetAwkIndent()
" Find previous line and get it's indentation
" Find previous line and get its indentation
let prev_lineno = s:Get_prev_line( v:lnum )
if prev_lineno == 0
return 0

View File

@ -57,7 +57,7 @@ function GetMmaIndent()
if getline(v:lnum) =~ '[^[]*]\s*$'
" move to the closing bracket
call search(']','bW')
" and find it's partner's indent
" and find its partner's indent
let ind = indent(searchpair('\[','',']','bWn'))
" same for ( blocks
elseif getline(v:lnum) =~ '[^(]*)$'

View File

@ -39,7 +39,7 @@ endfunction
function s:GetYamlIndent()
let pline = getline(v:lnum - 1)
if pline =~ ':\s*$'
return indent(v:lnum) + &sw
return indent(v:lnum) + shiftwidth()
elseif pline =~ '^\s*- '
return indent(v:lnum) + 2
endif

View File

@ -3,10 +3,12 @@
" Maintainer: Christian Brabandt <cb@256bit.org>
" Original Author: Nikolai Weibull <now@bitwi.se>
" Previous Maintainer: Peter Aronoff <telemachus@arpinum.org>
" Latest Revision: 2019-03-25
" Latest Revision: 2019-04-27
" License: Vim (see :h license)
" Repository: https://github.com/chrisbra/vim-sh-indent
" Changelog:
" 20190428 - De-indent fi correctly when typing with
" https://github.com/chrisbra/vim-sh-indent/issues/15
" 20190325 - Indent fi; correctly
" https://github.com/chrisbra/vim-sh-indent/issues/14
" 20190319 - Indent arrays (only zsh and bash)
@ -127,7 +129,7 @@ function! GetShIndent()
" Current line is a endif line, so get indent from start of "if condition" line
" TODO: should we do the same for other "end" lines?
if curline =~ '^\s*\%(fi\);\?\s*\%(#.*\)\=$'
let previous_line = searchpair('\<if\>', '', '\<fi\>', 'bnW')
let previous_line = searchpair('\<if\>', '', '\<fi\>\zs', 'bnW')
if previous_line > 0
let ind = indent(previous_line)
endif