For example I have this JavaScript code. The | character represents the cursor position and it is on an empty line.function a() {    console.log(a);    function b() {        console.log(b);        function c() {            console.log(c);        }|        c();    }    b();}After the requested operation, the contents would look like this:function a() {    console.log(a);    function b() {        console.log(b);        function c() {            console.log(c);        }        |        c();    }    b();}What I am asking for is a mapping command.Thank you very much! :-)
How to move the cursor to the correct indentation level without quiting insert mode?
key bindings;indentation;insert mode
As @jamessan mentioned, <C-f> will indent to the correct place from insert mode. You can also use <C-t> and <C-d> to increase or decrease the indention level from insert mode.However, you may be able to avoid getting into that situation completely by using one of the following techniques:Use o/O to start a new line from a previous lineUse cc/S to edit the line (takes indention into consideration)For more help see::h cc:h S:h o:h i_CTRL-T:h i_CTRL-F