Christian Heilmann

Locking editor panes in Visual Studio Code prevents unwanted multi-tab experiences

Wednesday, September 8th, 2021 at 8:19 pm

When using the Edge DevTools for VS Code extension inside the editor, one thing that I kept doing wrong was opening files accidentally next to the tools.

By default, the tools show up as their own pane next to the main editor. This is an editor pane of VS Code, and thus supports many things, including tabs.

Edge DevTools open in Visual Studio Code

When I use the tools, this group has focus. And when I go open another file to edit, it opens as a new tab next to the tools. Many a time this messed up my screencasts.

File accidentally opened next to the DevTools instead of the main editor

The trick is to lock the group with the tools in them. You do that by activating the … menu of the tools pane and select “Lock Group”.

Locking the pane with the DevTools Extension

The locked group then shows a lock icon and no other files will open as tabs on it, even if it had the focus.

Locked pane

You can see this in action in the following screencast.

Share on Mastodon (needs instance)

Share on Twitter

Newsletter

Check out the Dev Digest Newsletter I write every week for WeAreDevelopers. Latest issues:

160: Graphs and RAGs explained and VS Code extension hacks Graphs and RAG explained, how AI is reshaping UI and work, how to efficiently use Cursor, VS Code extensions security issues.
159: AI pipelines, 10x faster TypeScript, How to interview How to use LLMs to help you write code and how much electricity does that use? Is your API secure? 10x faster TypeScript thanks to Go!
158: 🕹️ Super Mario AI 🔑 API keys in LLMs 🤙🏾 Vibe Coding Why is AI playing Super Mario? How is hallucinating the least of our worries and what are rules for developing Safety Critical Code?
157: CUDA in Python, Gemini Code Assist and back-dooring LLMs We met with a CUDA expert from NVIDIA about the future of hardware, we look at how AI fails and how to play pong on 140 browser tabs.
156: Enterprise dead, all about Bluesky and React moves on! Learn about Bluesky as a platform, how to build a React App and how to speed up SQL. And play an impossible game in the browser.

My other work: