summaryrefslogtreecommitdiff
path: root/support
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-05-03 23:20:41 -0700
committerOri Bernstein <ori@eigenstate.org>2015-05-03 23:20:41 -0700
commit238bffb3afa386dea2980944271d28ec6d4d866c (patch)
treec6984ea39c6f36034fb612988c9afc497d1fca0b /support
parent78827d2e1df10175dbdb8dd0d70c7e4fcf4dbb81 (diff)
downloadmc-238bffb3afa386dea2980944271d28ec6d4d866c.tar.gz
Remove debug echos from vim script.
Diffstat (limited to 'support')
-rw-r--r--support/vim/indent/myr.vim9
1 files changed, 3 insertions, 6 deletions
diff --git a/support/vim/indent/myr.vim b/support/vim/indent/myr.vim
index e888c66..51bf4a6 100644
--- a/support/vim/indent/myr.vim
+++ b/support/vim/indent/myr.vim
@@ -27,9 +27,6 @@ function! s:CountMatches(line, lnum, pats)
let ic = Quoted(a:lnum, idx)
if !ic
let matches = matches + 1
- echo "NOT IN COMMENT " ic " lnum " a:lnum " idx " idx
- else
- echo "IN COMMENT"
endif
let idx = idx + strlen(p)
endif
@@ -69,14 +66,14 @@ function! GetMyrIndent(ln)
\ '\<while\>','\<for\>', '\<match\>',
\ '\<struct\>', '\<union\>',
\ '{', '\[', '^\s*|', '=\s*$']
- let outpat = ['}', '\].*', ';;']
- let outalone = ['\<else\>', '\<elif\>.*', '}.*', '].*', ';;', '|.*']
+ let outpat = ['}', ']', ';;']
+ let outalone = ['\<else\>', '\<elif\>.*', '}.*', '^\s*].*', ';;', '|.*']
let width = &tabstop
let n_in = s:CountMatches(prevln, ln - i, inpat)
let n_out = s:CountMatches(prevln, ln - i, outpat)
if s:LineMatch(curln, outalone) != 0
- let ind = n_in * &tabstop + ind - &tabstop
+ let ind = ind + (n_in - n_out - 1) * &tabstop
" avoid double-counting outdents from outalones.
elseif s:LineMatch(prevln, outpat) == 0
let ind = ind + (n_in - n_out) * &tabstop