Fork me on GitHub
#parinfer
<
2017-08-03
>
henrik04:08:25

I’m really not sure what would be the best way to go, but when faced with a number of displeasing alternatives, the least surprising option might be the best. For me, I’m thinking that might be 1) disable parinfer, 2) truncate all common whitespace from copied rows, 3) paste at the indentation level where the cursor is, 4) reenable parinfer iff brackets are balanced, otherwise reenable as soon as they’ve been manually balanced.

henrik04:08:31

Not entirely sure though, it’s a hairy problem that makes it hard to estimate how good the solution is until it’s been implemented.

dominicm07:08:37

Does the new v3 tab/shift tab work on selections? Could drop back to smart mode and allow people to make a selection to correct the indentation. That should fix it if I understand.

shaunlebron16:08:22

tab works on selections

shaunlebron16:08:06

but:

(foo
  (bar  ; <-- pasted line could adopt several expressions below
    baz
    ...))

shaunlebron16:08:28

if you pasted (bar above, and tried correcting its indentation in smart mode, the accidentally adopted lines below it would stick to it during correction, which I’ve found annoying

shaunlebron16:08:15

the adopted lines would not stick to (bar when adjusting in indent mode, which is why I think it’s better for correcting pastes