Moving, Duplicating and Deleting
The most common thing you'll do in your editor is move, duplicate and delete lines. Historically, we have done this with the use of copy/paste and the delete key when necessary. VS Code contains functionality that makes this process much more productive.
Here are a few more keyboard shortcuts to add to your repertoire.
Action
Keyboard Shortcut
Duplicate line
Opt/Alt + Shift + Down/Up Arrow
Move line
Opt/Alt + Down/Up Arrow
Delete Line
Cmd/Ctrl + Shift + K
Open the "index.html" file in the "start" folder.
Move the "title" tag above the "link" tag.
Put your cursor anywhere on the "title" line
Press Opt/Alt + Up Arrow

Duplicate the "description meta tag
Put your cursor anywhere on the line with the "meta" tag that has a name of "description"
Press Opt/Alt + Shift + Down Arrow
Change the "name" attribute to be "og:description"

Delete the "description" meta tag
Put your cursor anywhere on the line that has the
meta
tag with a name of "description"Press Cmd/Ctrl + Shift + K

Last updated
Was this helpful?