diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-02-25 00:00:01 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-02-25 00:00:01 +0100 |
commit | f391327adbbffb11180cf6038a92af1ed144e907 (patch) | |
tree | db1b98159a3f1960dc7df8157fc9fd5cbf40435a /runtime/indent/sh.vim | |
parent | 84f4996d2ab2982006d79ee69df4688c966bf8e8 (diff) |
Updated runtime files.
Diffstat (limited to 'runtime/indent/sh.vim')
-rw-r--r-- | runtime/indent/sh.vim | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/indent/sh.vim b/runtime/indent/sh.vim index 2d603b0afa..d05bb3770f 100644 --- a/runtime/indent/sh.vim +++ b/runtime/indent/sh.vim @@ -3,7 +3,7 @@ " Maintainer: Christian Brabandt <cb@256bit.org> " Previous Maintainer: Peter Aronoff <telemachus@arpinum.org> " Original Author: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2016-01-15 +" Latest Revision: 2016-02-15 " License: Vim (see :h license) " Repository: https://github.com/chrisbra/vim-sh-indent @@ -12,14 +12,14 @@ if exists("b:did_indent") endif let b:did_indent = 1 -let b:undo_indent = 'setlocal indentexpr< indentkeys< smartindent<' - setlocal indentexpr=GetShIndent() setlocal indentkeys+=0=then,0=do,0=else,0=elif,0=fi,0=esac,0=done,0=end,),0=;;,0=;& setlocal indentkeys+=0=fin,0=fil,0=fip,0=fir,0=fix setlocal indentkeys-=:,0# setlocal nosmartindent +let b:undo_indent = 'setlocal indentexpr< indentkeys< smartindent<' + if exists("*GetShIndent") finish endif @@ -67,7 +67,7 @@ function! GetShIndent() if !s:is_case_ended(line) let ind += s:indent_value('case-statements') endif - elseif line =~ '^\s*\<\k\+\>\s*()\s*{' || line =~ '^\s*{' + elseif line =~ '^\s*\<\k\+\>\s*()\s*{' || line =~ '^\s*{' || line =~ '^\s*function\s*\w\S\+\s*\%(()\)\?\s*{' if line !~ '}\s*\%(#.*\)\=$' let ind += s:indent_value('default') endif |