DEV Community

Tomas Stveracek
Tomas Stveracek

Posted on

4 1

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!

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (1)

Collapse
 
samurai71 profile image
Mark Landeryou β€’

Very useful article

Sentry image

See why 4M developers consider Sentry, β€œnot bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

πŸ‘‹ Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay