If you have 11 minutes to spare, watch this first. The general principle is:
[🐭 Mouse (Slow) and 🎹 Keyboard (Fast)]
If you work with tags (HTML, Vue, React), the most common task involves moving an entire tag to another location or file. Amateur coders will use a mouse to highlight the block of code and then cut and paste.
To save time, move your cursor to the start tag, for example somewhere in
<div>. Then press Alt-Shift-Right Arrow. The first stroke selects the word, then repeat the action until the selection is all the way to the closing
From here, you can then cut (
Ctrl-X) or move (
Alt-Up/Down Arrow) the selected code.
Ctrl-D: Quickly select the entire word where the cursor is. Press again to select the same word in a another location. Since there are multiple cursors, deleting or typing will make edits simultaneously.
Ctrl-Shift-K: Deletes the entire line where the cursor is
Ctrl-P: Allows you to open a file directly without using the mouse to locate it in a file directory.
Ctrl-Shift-Period: Opens a navigator to quickly jump to particular sections of code.
Enjoy your free time!
Top comments (2)
Lots of great tips thanks for sharing them! I know all VS Code users will find this worthwhile.
Ctrl-Shift-Period!, wow! thanks.