3 Things You Didn't Know VS Code Can Do - Part 2, Customizing Sidebar and Going to Definition in VS Code

Did you know, you can customize the sidebar’s position and contents in VS Code, create files immediately without deciding their location fro the home screen, and go to definition in almost anything in VS Code?

I’ve been creating a series of videos on YouTube about cool things in VS Code that you may not know about. Check out the DevChatter YouTube Channel if you want to see all of my videos, or you can see the VS Code Tips Playlist.

Customizing the VS Code Sidebar

Not only can you decide whether you want the VS Code Sidebar on the left or the right, you can decide what to include in the sidebar.

Moving the Sidebar to the Right or Left in VS Code

To move the sidebar to the left or the right, simply right click on the sidebar to open this context menu.

VS Code Sidebar Context Menu

Once you’ve made the change, either of these are possible:

VS Code Sidebar on the Right

VS Code with Sidebar on the Right

VS Code Sidebar on the Left

VS Code with Sidebar on the Left

Removing Items from VS Code Sidebar

Each of the items in the sidebar of VS Code can also be hidden, so you don’t have a cluttered sidebar where you can’t find the section you’re looking for. To remove the items, right-click on the sidebar to open the same context menu we used to move the sidebar from side to side.

VS Code Sidebar Context Menu

From this context menu, you can click on each item to show or hide it from the list. All with a checkmark are shown on the sidebar. Here’s a nice, clean sidebar.

VS Code with Clean Context Menu

Create Files with Double Click in VS Code

When you have no files open in VS Code, you can double click on the empty background to immediately open a new editor. At any point, you can save the text in the editor to a file.

This is a quick, easy way to get an editor open to type something, even just to hold onto for a minute.

Go to Definition with Ctrl-Click in VS Code

In VS Code, you can go to definition in many different contexts by holding the Ctrl key and left-clicking on things in the editor.

  • Clicking on a type name takes you to the type definition.
  • Clicking on a type members like methods, properties, or fields takes you the their definition on the type.
  • Clicking on a variable takes you to the declaration of that variable.

Comments