parinfer

tianshu 2018-03-22T04:30:27.000264Z

@shaunlebron except indent lines with tab, any case for multiple changes?

tianshu 2018-03-22T04:30:37.000095Z

multiple cursor?

shaunlebron 2018-03-22T10:34:49.000457Z

search/replace

tianshu 2018-03-22T10:36:55.000294Z

I'm trying to introduce parinfer-rust in emacs. in current version, there's no change in result, so I should replace the whole in editor? that may cause some issues in emacs.

shaunlebron 2018-03-22T11:00:08.000449Z

not sure what the vim plugin is doing, i don’t think it’s replacing whole text

shaunlebron 2018-03-22T11:00:28.000468Z

might wanna follow what it’s doing

shaunlebron 2018-03-22T11:01:16.000164Z

likewise, you can do parent-expression hack rather than replacing whole file

eraserhd 2018-03-22T11:40:53.000201Z

The Vim plugin finds the first and last changed lines and replaces that subset with one setline() call.

eraserhd 2018-03-22T11:41:51.000265Z

Actually, there's first a shortcut to test if it gets the text back unchanged, in which case it does nothing.

eraserhd 2018-03-22T11:42:19.000345Z

(well, it will still update the cursor POS)

eraserhd 2018-03-22T11:43:02.000079Z

It could be useful to move computing the delta into the wrapper.

dominicm 2018-03-22T11:55:22.000296Z

I might add support for nvim_buf_set_lines there :thinking_face: something about performance.

eraserhd 2018-03-22T17:12:07.000567Z

OK, so there's a test harness now: https://github.com/eraserhd/parinfer-rust/blob/master/tests/test_parinfer.vim

eraserhd 2018-03-22T17:12:40.000352Z

@dominicm It's using Vim-specific terminal functions, I think. It would be cool to have tests running on Neovim, also.

eraserhd 2018-03-22T17:12:45.000648Z

hint hint