Fork me on GitHub
#parinfer
<
2018-04-18
>
eraserhd12:04:08

Wait, paste will work if I just turn on force balance?

👀 4
eraserhd12:04:28

Or "kinda work"?

dominicm13:04:00

I just tried it in the online demo, force balance didn't fix my pasting woes

dominicm13:04:28

@eraserhd have you tried doing something like if &paste then paren_mode else smart_mode for vim?

eraserhd13:04:09

ah. I have not. That's interesting.

eraserhd13:04:58

I mean, that only works for pasting into the terminal, and it assumes you are pasting something already balanced.

eraserhd13:04:02

Is that a good assumption?

dominicm13:04:33

better than the current situation of messing up the balance when pasting?

eraserhd13:04:39

Well, paren mode will fail if it's not balanced.

eraserhd13:04:19

I wonder if this is what partialResult is for.

eraserhd14:04:27

Oh, wait. Pasting into the terminal will be receiving 1000 edits. That probably won't work.

dominicm14:04:58

could you batch while someone is in paste? :thinking_face:

dominicm14:04:44

like, first message in paste = cursor start position, and when you're finally in &nopaste, then you send the whole set of changes. Getting a bit complicated now though.

eraserhd14:04:48

Hmm. Well, I think disabling while in paste is a good start. I think that's what it's for. It might be doable and nice to run paren mode on the first event after paste is disabled. Or add a command to run it manually?

eraserhd15:04:21

It seems force_balance doesn't work the same on the rust port. I shall fix.

eraserhd15:04:48

>>> Hey! If anyone wants to write the online documentation for the parinfer-rust Vim plugin, that's a thing which I would greatly appreciate. <<<

eraserhd15:04:11

The Vim online documentation, I mean.

eraserhd18:04:02

Interesting

eraserhd18:04:31

I actually saw today that there is a webassembly to jvm compiler. Don't know much about it.

eraserhd18:04:16

(wasm-pack article queued for reading)