Noticable delay when opening new line
- Open a new, empty Clojure buffer
- Hit o to open a new line
There's about a one second delay before the operation completes. The same thing happens with opening a line above (shift-o). The delay seems independent of the size of content of the file. It's the same in an empty file or a 3000 line file.
I did some basic diagnosis. First note that clearing indentexpr remove the delay, and, of course, proper indenting. It's interesting that indenting by hitting enter at the end of a line has no delay.
Here's one thing I noticed: in indent/clojure.vim, add a "return 0" at the start of CheckForString(). The delay goes away. Now move the return statement to immediately after the definition of the closure function, but before the call to WithSavedPosition(). The delay returns. It's as if the definition of the closure function is the slowdown. I'm guessing there will be a similar problem with IsMethodSpecialCase().
Thoughts? I've chatted on Twitter with someone who has the same problem and I've seen it on both OSX and Linux.