I'm trying to get into the often recommended habit of not using the arrow keys but only the hjkl ones. Now I often find myself in the following situation. I have just typed
someFunction()
and the cursor is in insert mode in between the (
and )
. Next I only need to type ;
someFunction();
and press esc to finish. Pressing on the right arrow key is probably easiest but is starting to feel awkward and too much time needed to complete the action. Plus some people disable their arrow keys to get into the habit of not using them. Is there something faster than hitting esc and shift-A or is the right arrow key fastest in this case?
Why would your cursor be in between the (
and )
? Shouldn't it be after the )
if you typed it?
If it was automatically closed via the vim plugin delimitMate, what you should be doing is typing the )
even though the plugin auto-completed for you. The plugin will notice that you're closing the parenthesis pair and just move your cursor after the auto-closed )
.