Closed swekaj closed 10 years ago
What is the value of the indentkeys
option? Note that 0]
is missing in the current version of the indent script but it should work for )
.
Try :set indentkeys=0{,0},0),0],:,!^F,o,O,e,*<Return>,=?>,=<?,=*/
If the )
or ]
is indented correctly when you use <C-F>
on the line or ==
in normal mode it means that the problem is caused by delimitMate which doesn't trigger the call to indentexpr
when it auto-inserts )
or ]
Ah, ok. So the problem is with delimitMate, then, as the )
and ]
indent correctly when I use <C-F>
, ==
, or one of the other characters normally in &indentkeys
(e.g. a ,
).
I'll open issue there, then. Thanks for your help.
This issue is when Raimondi/delimitMate is installed and the
delimitMate_expand_cr
option is enabled.If you type
[<cr>
or(<cr>
, the expected behavior is:where
|
is the cursor position. Instead, what happens is:Notice the closing
)
is indented one level farther than it should be. The same behavior happens with[ ]
.I'm not sure if this is an issue with the indenting script, or DelimitMate. I guessed the indenting since
{ }
pairs work fine, but if I was wrong I can open issue there instead.