visual-studio-code

After VS Code auto closes a quote, parentheses, or bracket, what key do i hit to move to the next position after that closing mark?


I'll start typing something in VS Code like class="bob", and as soon as I type the opening " mark, VS Code will auto populate the closing " mark as well. Very helpful! BUT, once I'm done entering my string of information, I find myself having to adjust my keys on my keyboard to arrow right past the character that was automatically added, then hit a space, and continue on my coding way.

However this can interrupt my typing flow, as it would be just as easy if not easier for me to type the closing " mark myself without adjusting my hand from the default keyboard position.

This happens with other characters, too, not just quotes. Parentheses, brackets, single quotes, and similar items that show up in pairs.

When I watch videos of some people coding, they seem to gracefully whiz by those auto-added closing punctuation marks, so it makes me think there is something I'm missing in how I accept that automated input. Some way that is more zen like than using a right arrow.


Solution

  • You have several options:

    1. Type the character that added automatically. For example, if you type { and automatically VS Code added } you can also type } to continue typing whatever you want. VS Code is smart to not doubling the automatically added character
    2. Use End key
    3. Use arrow right key

    I think the VS Code team didn't find it needed to add some special key for this need, since all these options are also one key each.