I have been using Emacs for a very long time and now I want to switch to something modern like VS code. One thing that I really used to in Emacs is auto indentation with a Tab key:
http://www.gnu.org/software/emacs/manual/html_node/emacs/Indentation.html
Turned on with tab-always-indent
I want VS code not to add a tab symbol when Tab
is pressed, but auto indent a single line like Emacs does, how do I configure that?
Here is an example in Javascript:
function foo(){
} // Press Tab here
In Emacs the result will be (and I want the same in VS code):
function foo(){
}
so the bracket will go to the beginning of line, but the result in VS code will be
function foo(){
} // second tab added
Emacs does indentation according to the current text mode (Python/JS/C++/Whatever).
PS. I know I can select a region of code and use "Format Selection" or do auto-formatting on save.
Tab
unusable. – Alex Yu