Issue #101 (Centered Layout)03/27/24
Techpresso: Get Smarter About AI and Tech in 5 mins
Receive a daily summary of the most important AI and Tech news, carefully selected from 60+ media outlets.
Also includes a good dose of tech tools and programming-related apps and resources. Join 30,000+ professionals from OpenAI, Meta, Google, Microsoft, Hugging Face, JP Morgan, and more.
|
|
|
Here's a quick and easy tip that will likely be more interesting to newer VS Code users. A while back VS Code added a featured called "Centered Layout" mode that centers you editor in VS Code's UI and allows you to ensure you have full control over how much space your editor is taking up.
You can enable Centered Layout mode via
View > Appearance > Centered Layout. Maybe you've seen that option before when accessing Zen mode or Full Screen mode but didn't think much of it.
You can also access it via the command palette by searching for
"View: Toggle Centered Layout".
You'll notice by default this toggle doesn't have a keyboard shortcut. If you find yourself switching to and from Centered Layout mode, you can easily go into your keyboard shortcut settings and add a custom shortcut.
Centered Layout mode only works when you're viewing a single editor. So even if it's on, it's essentially disabled when you're in split editor view.
In Centered Layout mode, when you resize the editor window using the left or right "sashes", both sides are resized at the same time, as demonstrated in the GIF below. This helps preserve the centered layout.
If you want to temporarily disable this resizing feature to only resize a single side while in Centered Layout mode, just hold the ALT key (OPT on Mac) while resizing. You can also look up "Centered Layout" in your UI settings. You'll see two options for customizing how it behaves, depending on editor groups and whether you're resizing the whole window as opposed to just the editor.
And one final point: if you use Zen mode then you probably already noticed that Zen mode uses a centered layout by default, even if you don't have it enabled for the editor in general. Zen mode also includes a setting that lets you disable it in Zen mode if you wish.
Now on to this week's hand-picked links!