diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-01-26 15:56:19 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-01-26 15:56:19 +0100 |
commit | 8a7d6542b33e5d2b352262305c3bfdb2d14e1cf8 (patch) | |
tree | 8e5f241129a1c690ea81d697a72fb4c1704c0cb6 /runtime/indent | |
parent | 1d9215b9aaa120b9d78fee49488556f73007ce78 (diff) | |
download | vim-git-8a7d6542b33e5d2b352262305c3bfdb2d14e1cf8.tar.gz |
patch 8.2.0149: maintaining a Vim9 branch separately is more workv8.2.0149
Problem: Maintaining a Vim9 branch separately is more work.
Solution: Merge the Vim9 script changes.
Diffstat (limited to 'runtime/indent')
-rw-r--r-- | runtime/indent/vim.vim | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/indent/vim.vim b/runtime/indent/vim.vim index db27f1971..b0c0a3916 100644 --- a/runtime/indent/vim.vim +++ b/runtime/indent/vim.vim @@ -10,7 +10,7 @@ endif let b:did_indent = 1 setlocal indentexpr=GetVimIndent() -setlocal indentkeys+==end,=else,=cat,=fina,=END,0\\,0=\"\\\ +setlocal indentkeys+==end,=},=else,=cat,=fina,=END,0\\,0=\"\\\ let b:undo_indent = "setl indentkeys< indentexpr<" @@ -92,7 +92,7 @@ function GetVimIndentIntern() else " A line starting with :au does not increment/decrement indent. if prev_text !~ '^\s*au\%[tocmd]' - let i = match(prev_text, '\(^\||\)\s*\(if\|wh\%[ile]\|for\|try\|cat\%[ch]\|fina\%[lly]\|fu\%[nction]\|el\%[seif]\)\>') + let i = match(prev_text, '\(^\||\)\s*\({\|\(if\|wh\%[ile]\|for\|try\|cat\%[ch]\|fina\%[lly]\|fu\%[nction]\|def\|el\%[seif]\)\>\)') if i >= 0 let ind += shiftwidth() if strpart(prev_text, i, 1) == '|' && has('syntax_items') @@ -115,8 +115,8 @@ function GetVimIndentIntern() " Subtract a 'shiftwidth' on a :endif, :endwhile, :catch, :finally, :endtry, - " :endfun, :else and :augroup END. - if cur_text =~ '^\s*\(ene\@!\|cat\|fina\|el\|aug\%[roup]\s\+[eE][nN][dD]\)' + " :endfun, :enddef, :else and :augroup END. + if cur_text =~ '^\s*\(ene\@!\|}\|cat\|fina\|el\|aug\%[roup]\s\+[eE][nN][dD]\)' let ind = ind - shiftwidth() endif |