I was talking about nested indents, like this:
f(a,
b, g(c,
d
)
)
Vscode cannot indent it properly due to how indent rules (simple regexes) work. Formatters like “prettier” exist but they can only format whole-file. Maybe try that (downside being you’re at its mercy completely).
I guess you are experiencing either auto-indent like that or the partially selected lines problem (when selection doesn’t touch \n at both ends). Vscode and sublime should also have a way to “paste raw” without reindenting. Try copying proper non-partial lines and/or pasting raw at column 0, removing automatic indent and adding yours afterwards. I know it’s tedious but I’ve seen enough people editing in ms-style editors and they all had this issue. Most just accept it as a fact of life.
As a vim user I’m afraid I can’t help much here. My copy-pasting is almost always line-oriented (V-mode copied lines always pasted after current line, regardless where the cursor is) and indent rules are very robust so it rarely indents things wrong. I also have gv> and gv= to re/indent just pasted text. I’d ask on stackoverflow (stackexchange) or on HN which popular editors have whole-line modes or maybe vscode/sublime plugins which can help with that.