Fork me on GitHub
#parinfer
<
2018-03-30
>
eraserhd15:03:34

pushed a fix for c

eraserhd17:03:33

thought: typing semicolon while pushing a lot of closing parens should remove the paren trail from the new comment.

eraserhd17:03:58

also, I accidentally hit ; a lot

shaunlebron17:03:15

is there no vim “change” event to subscribe to?

shaunlebron17:03:44

ideally, if the buffer changed, there would be an event that described the nature of the change for any operation

shaunlebron17:03:21

I’ve only personally integrated smart mode for Atom and CodeMirror so far. both had the “change” event I described

justinlee17:03:12

@eraserhd hah i thought i was the only one. which is too bad because hitting semicolon with parinfer accidentally really causes pandemonium sometimes!

eraserhd17:03:50

@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.

eraserhd17:03:47

(as well as after). I'm now tracking CursorMove, which helps in some cases and hurts in others.

eraserhd17:03:28

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.

eraserhd17:03:32

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. 🙂

eraserhd17:03:35

Well, it's going to be annoying case-by-case work, but I have a decent test rig now, so it'll get better.