DEV Community

Tomas Stveracek
Tomas Stveracek

Posted on

Boost Your Productivity with These Essential Developer Shortcuts in DevTools and VS Code

As developers, we spend a significant amount of time using DevTools and VS Code. Mastering a few key shortcuts can help you work faster, reduce mouse dependency, and make you a more efficient coder. Here are some of my favorite shortcuts that can save you time.

DevTools Shortcuts 🚀

1. Inspect Elements Faster
Instead of pressing F12 to open DevTools, try using Ctrl + Shift + C (Windows/Linux) or Cmd + Option + C (Mac). This instantly activates the element inspector, so you can click on any part of the page and start inspecting right away.

2. Toggle Console
Want to quickly check the console? Use Ctrl + ~ (Windows/Linux) or Cmd + ~ (Mac) to toggle the console open and closed without disrupting your workflow.

3. Open DevTools Directly on the Console Tab
Sometimes, you just need to dive right into the console. Instead of opening DevTools and switching tabs, press Ctrl + Shift + J (Windows/Linux) or Cmd + Option + J (Mac) to jump directly to the console.

4. Select Next/Previous HTML Node
When inspecting HTML elements, navigating between them can be a hassle. Use Arrow Up and Arrow Down to move between HTML nodes in the DOM tree, without the need for a mouse.

VS Code Shortcuts 💻

1. Command Palette
The Ctrl + Shift + P (Windows/Linux) or Cmd + Shift + P (Mac) shortcut is your best friend in VS Code. This opens the Command Palette, where you can search for any command without leaving your keyboard.

2. Multi-Cursor Magic
Ever need to edit multiple lines at once? Use Alt + Click (Windows/Linux) or Option + Click (Mac) to place multiple cursors. Combine this with Ctrl + D (Windows/Linux) or Cmd + D (Mac) to select the next occurrence of a word or phrase.

3. Toggle Sidebar
Need more space in your editor? Use Ctrl + B (Windows/Linux) or Cmd + B (Mac) to quickly toggle the sidebar.

4. Navigate Between Open Files
Switch between open files effortlessly with Ctrl + Tab (Windows/Linux) or Cmd + Tab (Mac). This shortcut cycles through your tabs without needing to touch the mouse.

5. Quick Fix
Encountered an error or warning? Use Ctrl + . (Windows/Linux) or Cmd + . (Mac) to bring up VS Code's Quick Fix suggestions.


These shortcuts can really help streamline your workflow. By learning and practicing them, you'll spend less time on repetitive tasks and more time writing great code!

What are your favorite shortcuts? Let me know in the comments!

Top comments (1)

Collapse
 
samurai71 profile image
Mark Landeryou

Very useful article