diff options
author | Ori Bernstein <ori@eigenstate.org> | 2015-06-28 14:26:16 -0700 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2015-06-28 14:26:16 -0700 |
commit | b05bd318302a3b5043a56479d20261d81bc27012 (patch) | |
tree | e6a6532e0fd6255321fd6335464e8e57c28548cf /support | |
parent | d17587d89ed49739392eb6d768d583c7f5955d2c (diff) | |
download | mc-b05bd318302a3b5043a56479d20261d81bc27012.tar.gz |
Implement '__init__' functions.
Diffstat (limited to 'support')
-rw-r--r-- | support/vim/indent/myr.vim | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/support/vim/indent/myr.vim b/support/vim/indent/myr.vim index d20010a..356f9ea 100644 --- a/support/vim/indent/myr.vim +++ b/support/vim/indent/myr.vim @@ -66,9 +66,9 @@ function! GetMyrIndent(ln) \ '\<while\>','\<for\>', '\<match\>', \ '\<struct\>', '\<union\>', \ '{', '\[', '(', '^\s*|.*:', '=\s*$'] - let outpat = ['}', ']', ')', ';;'] + let outpat = ['}', ']', ')'] let outalone = ['\<else\>', '\<elif\>.*', ';;', '|.*', - \ '].*', ').*', '}.*'] + \ '].*', '}.*'] let width = &tabstop let n_in = s:CountMatches(prevln, ln - i, inpat) @@ -84,9 +84,10 @@ function! GetMyrIndent(ln) let n_out = n_out + 1 endif - " we already outdented if we had an outalone - if s:LineMatch(prevln, outalone) != 0 - let n_out = 0 + " we already outdented if we had an outalone, but since all + " outpats are also outalones, we don't want to double count. + if s:LineMatch(prevln, outalone) != 0 && n_out > 0 + let n_out = n_out - 1 endif let n_out = n_out + s:LineMatch(curln, outalone) |