Menu

1 / 2

10 VS Code Shortcuts Every Developer Should Know (But Most Don't)

DEV Community·Suifeng023·6 months ago
#cAE8u5wz
#vscode#productivity#webdev#beginners#ctrl
Reading 0:00
15s threshold

10 VS Code Shortcuts Every Developer Should Know (But Most Don't)

Stop reaching for the mouse. These keyboard shortcuts will 10x your coding speed.

I've been using VS Code for 5+ years, and I still discover new shortcuts that blow my mind. Here are the 10 most impactful shortcuts that separate power users from everyone else.

1. Multi-Cursor Magic: Ctrl + D

Select the next occurrence of the current word. Keep pressing to select more.

// Want to rename all 'count' to 'total'? // Place cursor on 'count' → Ctrl+D repeatedly → type 'total'

Enter fullscreen mode

Exit fullscreen mode

Pro tip: Ctrl + Shift + L selects ALL occurrences at once.

2. Move Lines Like a Boss: Alt + ↑/↓

Move the current line (or selected block) up or down. No cutting and pasting.

# Cursor on line 2, press Alt+↑ x = 10 # ← was line 2, now line 1 def hello (): # ← was line 1, now line 2 pass

Enter fullscreen mode

Exit fullscreen mode

3. Duplicate Line: Shift + Alt + ↓

Instantly duplicate the current line below.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.