When auto-completing, most editors either overwrite the word your cursor is in front, or just insert the completion without touching any other text. Atom has a happy medium between the two that I really like, but is a bit hard to put into words. It basically replaces any part of the word that is a suffix of the completion. Let me give some examples, the pipe (|
) is the cursor and in each example, we autocomplete "HelloWorld":
Hello|You
->HelloWorld|You
Hello|World
->HelloWorld|
Hello|InTheWorld
->HelloWorld|InTheWorld
Hello|rld1234
->HelloWorld|1234
I've found that this rarely gets it wrong, without me needing to think about whether I wanted to replace something or not. And having gotten used to it, I find both the other options (always replacing and never replacing) do something I didn't want often.
I'm finally looking at switching away from Atom. Is there a way to make autocomplete work in VS Code the way it does in Atom?