In a simple text editor? My requirement would just be that copy/paste does intelligent things with indents.
In Sublime, Paste and Indent (Shift-Cmd-V on Mac) does that fairly well. It's not based on an AST or anything like that, but it's rarely failed to do the right thing in my experience with these: Python, XML, HTML, CSS, SASS, PowerShell, YAML, Ruby
For me, it's a robust extension API, because then I can have any feature I want given enough time. Atom definitely has an edge there imo. Performance is also a plus (I have no complaints there with Atom). VSCode looks promising, though.
There's a few other nice-to-haves, but those are the big ones.