Wait, paste will work if I just turn on force balance?
Or "kinda work"?
I just tried it in the online demo, force balance didn't fix my pasting woes
@eraserhd have you tried doing something like if &paste then paren_mode else smart_mode
for vim?
ah. I have not. That's interesting.
I mean, that only works for pasting into the terminal, and it assumes you are pasting something already balanced.
Is that a good assumption?
better than the current situation of messing up the balance when pasting?
Well, paren mode will fail if it's not balanced.
I wonder if this is what partialResult is for.
Oh, wait. Pasting into the terminal will be receiving 1000 edits. That probably won't work.
could you batch while someone is in paste? :thinking_face:
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.
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?
It seems force_balance doesn't work the same on the rust port. I shall fix.
>>> Hey! If anyone wants to write the online documentation for the parinfer-rust Vim plugin, that's a thing which I would greatly appreciate. <<<
The Vim online documentation, I mean.
@eraserhd https://hacks.mozilla.org/2018/04/hello-wasm-pack/ might be useful for parinfer-rust?
Interesting
I actually saw today that there is a webassembly to jvm compiler. Don't know much about it.
(wasm-pack article queued for reading)