summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-05-02 21:20:27 -0700
committerOri Bernstein <ori@eigenstate.org>2015-05-02 21:20:27 -0700
commit207d86eced0726bf8ce0eaeb6b6e06a40e47a2d9 (patch)
tree324f7bf7d4965fdb69af4d7606cbe18772d06f0c
parentb08f20e577c31f439f4beb525125c6823b27c606 (diff)
downloadmc-207d86eced0726bf8ce0eaeb6b6e06a40e47a2d9.tar.gz
Handle [] indents better.
-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