summaryrefslogtreecommitdiff
path: root/support/vim/indent/myr.vim
diff options
context:
space:
mode:
Diffstat (limited to 'support/vim/indent/myr.vim')
-rw-r--r--support/vim/indent/myr.vim8
1 files changed, 4 insertions, 4 deletions
diff --git a/support/vim/indent/myr.vim b/support/vim/indent/myr.vim
index 8c5d380..024aaef 100644
--- a/support/vim/indent/myr.vim
+++ b/support/vim/indent/myr.vim
@@ -68,9 +68,9 @@ function! GetMyrIndent(ln)
let inpat = ['\<if\>', '\<elif\>', '\<else\>',
\ '\<while\>','\<for\>', '\<match\>',
\ '\<struct\>', '\<union\>',
- \ '{', '^\s*|', '=\s*$']
- let outpat = ['}', ';;']
- let outalone = ['\<else\>', '\<elif\>.*', '}', ';;', '|.*']
+ \ '{', '\[', '^\s*|', '=\s*$']
+ let outpat = ['}', '\]', ';;']
+ let outalone = ['\<else\>', '\<elif\>.*', '}', '].*', ';;', '|.*']
let width = &tabstop
let n_in = s:CountMatches(prevln, ln - i, inpat)
@@ -85,7 +85,7 @@ function! GetMyrIndent(ln)
return ind
endfunction
-setlocal indentkeys+=,;\|,=elif
+setlocal indentkeys+=,;\|],=elif
setlocal indentexpr=GetMyrIndent(v:lnum)
let b:did_indent = 1