I am using VS Code to write some HTML. I noticed that the IDE will auto-insert some code for me. For example, if I want a <p>
tag, VS Code will create <p></p>
for me and the cursor will land in the middle (between the opening and closing paragraph tags). However, when I am done typing the content inside the <p>
tags, typically, I use my mouse or the directional right-arrow to move to the end. Is there a way to not move my fingers from the typing positions (e.g. fdsa and jkl;) to go to the end of the line or tag, or would I always have to use the mouse or directional pad?
I find IDEs like what JetBrains provide do not have this limitation for certain languages. For example, in Python, if I want to print something using PyCharm, I can type (the closing single quote and right parenthesis are auto-added)
print('')
My cursor will land inside the single quotes. To simply get outside the closing parenthesis, I simply type in '
followed by )
and the IDE is smart enough to know to not place the single quote and closing parenthesis there (it's like using the right arrow twice to get outside the print statement).
WebStorm, like VS Code, has the "problem" when dealing with HTML. If I am inside an opening and closing <p>
tag, and right next to the closing one </p>
, simply typing <
, /
, p
, >
will not land me outside (as with Python and PyCharm). On Windows, I can press the End
key or on Mac I can press fn+right
to get to the end; but that requires breaking the flow and continuity of my hands in the typing positions (eyes have to be redirected too).
Any tips on how to be a more productive coder using VS Code or other modern IDEs with HTML? Are there plugins that we may use to address this problem?
CTRL + k
thenCTRL + S
to open your shortcuts. β Screwy