pushed a fix for c
thought: typing semicolon while pushing a lot of closing parens should remove the paren trail from the new comment.
also, I accidentally hit ;
a lot
is there no vim “change” event to subscribe to?
ideally, if the buffer changed, there would be an event that described the nature of the change for any operation
I’ve only personally integrated smart mode for Atom and CodeMirror so far. both had the “change” event I described
@eraserhd hah i thought i was the only one. which is too bad because hitting semicolon with parinfer accidentally really causes pandemonium sometimes!
@shaunlebron Vim events are very weird. They don't carry a lot of information, like the previous cursor. So I need to find events that get triggered before each thing.
(as well as after). I'm now tracking CursorMove, which helps in some cases and hurts in others.
There's also weirdness where some commands which enter "insert mode" make changes in the process, and those changes don't emit a "TextChanged*" event.
😕 bummer
So sometimes I need to call parinfer on InsertEnter (e.g. a "change" command), and sometimes I need to store the cursor position for the next change. 🙂
Well, it's going to be annoying case-by-case work, but I have a decent test rig now, so it'll get better.