|
|
|
|
|
by umvi
2500 days ago
|
|
> I'll figure out a way to get the editor to do it for me and ask you for a raise for the trouble You don't have to "figure out" anything. It's the default of every IDE I've ever used. I press tab, VSCode inserts 4 spaces. I press shift+tab, it deletes 4 spaces. Nobody actually presses spacebar 4 times to indent unless they are forced to use vim on some remote machine. |
|
Which is probably not every IDE or editor.
> I press shift+tab, it deletes 4 spaces.
How entirely intuitive and not-awkward compared to hitting delete.
> they are forced to use vim on some remote machine.
Vim is not exactly unpopular as an editor of choice.
But overarching all that -- the ;) at the end of my comment should have been a clue that I was not sincerely arguing that figuring out how to use spaces for tabs is an involved task. Even somebody using vim (whether forced or by choice) should know `:set expandtab`. Most editors worth investing in will provide a convenient way of doing this.
Rarer are the editors that will also let you change indentation width on the fly while expanding tabs to spaces, though, which is generally easy if you use tab characters for indentation. I'm not super familiar with VSCode, but having just fired it up and tried it out, maybe it can do this if you turn on Detect Indentation, though it doesn't seem to be the default, and I haven't put it through the paces for less trivial cases.