Issue #50 (Keyboard Shortcuts to Navigate Sidebar & Editor)04/05/23
One of the best ways to speed up your workflow in VS Code is to learn certain keyboard shortcuts. Especially do you want to learn ones that replace tedious mouse actions.
One particular pair of keyboard shortcuts can drastically improve the speed at which you work when doing things in the editor then moving to the sidebar and back again.
If you haven't already memorized these keyboard shortcuts, here they are:
- CTRL/CMD-0 - Switch focus to the sidebar
- CTRL/CMD-1 - Switch focus to the editor
When you hit CTRL/CMD-0, focus will be put on whatever file or area of the sidebar you were last in. So if you were in the folder pane, it will focus the last file or folder you accessed before you started editing. If you happen to be in the Extensions pane, it will go back to there.
Usefully, when you hit CTRL/CMD-1 to go back to the editor, it will put focus back wherever your cursor left off.
So if you happen to be editing a specific part of the document, it's nice to just go back to wherever you were previously. Of course, if you've already scrolled to another part of the document but left your cursor elsewhere, focus will still take you to the last place your cursor was, not the last place you scrolled to.
And of course, if you prefer, you can customize these by editing them in your keyboard shortcuts.
For reference, they're called "Focus Into Primary Side Bar" and "Focus First Editor Group" — or you can find them by typing the keyboard shortcuts themselves.
Now on to this week's hand-picked links!