autoindent and matlab
Submitted by Monday, 3 September, 2007 - 14:29
on
hi, I have fiddled with the autoindent in matlab mode, and i come up with this:
< PROPERTY NAME="indentNextLines" VALUE="^\s*(if|for|function|switch|try|while)([\t ]*\(|[\t ]+|$).*(?!end)$" />
< PROPERTY NAME="indentNextLine" VALUE=".*?\.{3}.*" />
< PROPERTY NAME="unindentThisLine" VALUE="^\s*(end|else|elseif([\t ]*\(|[\t ]+).*|case|otherwise|catch)[\t ]*(%.*)?$" />
< PROPERTY NAME="unindentNextLines" VALUE="^\s*end\s*(%.*)?$" />
that gives something like this:
if foo
bar
end
foobar
and that is wrong, but if I mark it and press 'indent-lines' (c+i) I get:
if foo
bar
end
foobar
which is correct.
Anny idea who this can be correct on the fly?
< PROPERTY NAME="indentNextLines" VALUE="^\s*(if|for|function|switch|try|while)([\t ]*\(|[\t ]+|$).*(?!end)$" />
< PROPERTY NAME="indentNextLine" VALUE=".*?\.{3}.*" />
< PROPERTY NAME="unindentThisLine" VALUE="^\s*(end|else|elseif([\t ]*\(|[\t ]+).*|case|otherwise|catch)[\t ]*(%.*)?$" />
< PROPERTY NAME="unindentNextLines" VALUE="^\s*end\s*(%.*)?$" />
that gives something like this:
if foo
bar
end
foobar
and that is wrong, but if I mark it and press 'indent-lines' (c+i) I get:
if foo
bar
end
foobar
which is correct.
Anny idea who this can be correct on the fly?