Skip to content

Latest commit

聽

History

History
47 lines (35 loc) 路 2.82 KB

File metadata and controls

47 lines (35 loc) 路 2.82 KB

VS Code & Web Dev Shortcuts

1. VS Code Speed Shortcuts

  • Duplicate Line: Shift + Alt + Down Arrow - Copies the current line and pastes it directly below.
  • Move Line: Alt + Up/Down Arrow - Moves the current line of code up or down through your file.
  • Multi-Cursor: Alt + Click - Places multiple cursors on the screen so you can type in 5 places at once.
  • Command Palette: Ctrl + Shift + P - Opens the master search bar to run any VS Code command.
  • Toggle Terminal: Ctrl + ~ (tilde) - Instantly opens or hides the terminal at the bottom of your screen.
  • Format Document: Shift + Alt + F - Automatically cleans up messy code and fixes your indentation.

2. Markdown Formatting

  • Headings: Use # for H1, ## for H2, and ### for H3.
  • Bold: Wrap text in **double asterisks**.
  • Italics: Wrap text in *single asterisks*.
  • Inline Code: Wrap commands like git status in single backticks.

3. Emmet HTML Shortcuts

Type this Press Result
! Tab Generates the entire HTML boilerplate.
h1 Tab Generates <h1></h1>.
lorem5 Tab Generates exactly 5 words of dummy text.
ol>li*3 Tab Generates an ordered List with 3 List Items inside it.
a Tab Generates an anchor tag ready for a link.

4. Essential VS Code Window Controls

  • Toggle Word Wrap: Alt + Z - Forces long lines of text to fit inside your screen so you do not have to scroll sideways.
  • Global Search: Ctrl + Shift + F - Searches for a specific word across every single file in your entire master folder.
  • Close Current Tab: Ctrl + W - Instantly closes the file you are currently looking at.

5. Fast Code Editing (The "Oops" Fixers)

  • Toggle Comment: Ctrl + / (forward slash) - Automatically turns the line you are on into a comment (like <!-- note -->). Press it again to uncomment it!
  • Find and Replace: Ctrl + H - Lets you find a specific word or tag in your file and instantly replace it with something else.
  • Undo / Redo: Ctrl + Z (Undo) and Ctrl + Y (Redo) - Your safety net if you accidentally delete something.
  • Select Next Match: Ctrl + D - Highlight a word (like a p tag), press Ctrl + D, and it automatically highlights the next time that word appears and gives you a second cursor! Keep pressing it to select more.
  • Delete Entire Line: Ctrl + Shift + K - Instantly deletes the line of code your cursor is on. No need to highlight it or hold down the backspace key.
  • Jump Word by Word: Ctrl + Left/Right Arrow - Instead of moving your cursor one single letter at a time, this jumps your cursor entire words at a time.
  • Jump to Start/End of Line: Home key or End key - Instantly snaps your cursor to the very beginning or the very end of the line you are on.