Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to make an editor split full-screen in VSCode?

I'd like to have the ability to make one of multiple split editor windows full screen.

I usually have two vertically splitted windows with code and it would be useful to make sort of full-screen-zoom without explorer terminal and all other bars, just code.

Initally I have the following:

enter image description here

but I would like to configure a shortcut to make an active window full-screen like this:

enter image description here

It is like F11, closing the explorer, and merging the split. It is messy to do it by hand all the time...

like image 850
St.Antario Avatar asked Oct 06 '18 14:10

St.Antario


People also ask

How do you split the screen in VS Code?

Ctrl+\ to split the active editor into two. Open to the Side (Ctrl+Enter) from the Explorer context menu on a file. Click the Split Editor button in the upper right of an editor. Drag and drop a file to any side of the editor region.

How do you unsplit editor in VS Code?

From the Window menu, select Remove Split.

How do you split screen horizontally in VS Code?

Yes. You can toggle splitting orientation with: Ctrl + Shift + P (Command Palette) Toggle Vertical/Horizontal Editor Layout.


3 Answers

I would like to configure a shortcut to make an active window full-screen.

You need to edit keybindings. Press Ctrl+K and then Ctrl+S to open keyboard shortcuts.

If you're on a mac, use Command key instead of Ctrl.

Search full screen in search bar. You will see something like this:

screenshot

Click on the result. Press Ctrl+K and Ctrl+K (again!) or click pencil icon to edit the shortcut. Press desired key combination. That's it.

And here are some more shortcuts to learn:

Press Ctrl+K and then Z to open editor in full screen without explorer and terminal, etc. And you can use Ctrl+B to show/hide side bar and Ctrl+J to show terminal and console panel.

Download keyboard shortcuts file here for your favourite OS.

To make these hotkeys work in vim-mode:

Actually VSCodeVim will take over your control keys. This behaviour can be adjusted with the useCtrlKeys and handleKeys settings. Go to File>>Preferences>>Keyboard Shortcuts. Search for Ctrl+k in search bar. You will see extension.vim_ctrl+k as below:

screenshotVim

Change this hotkey. Now it should work.

like image 138
itsmysterybox Avatar answered Oct 22 '22 06:10

itsmysterybox


The closest you can get to maximize ONE EDITOR GROUP out of two open editor groups, (capitalizing because nobody read the actual question properly!)

is to set this command as a shortcut:

View: Toggle Editor Group Sizes
workbench.action.toggleEditorWidths

which will toggle the active editor group to 90% of the screen

If you have the side bar open that will take up another 10%, to close that automatically use:

View: maximize Editor Group and Hide Sidebar
workbench.action.maximizeEditor

(this command doesn't toggle so you still need the previous shortcut) (and also now your sidebar is closed when you toggle back)

To achieve maximum fullscreen vibe, use Ctrl-k z to enter zen mode, the sidebar, terminal, menus and clutter disappear, leaving just the editor groups, which you can toggle their size with the previously mentioned shortcut.

Don't get lost in zen mode! It happens, remember the shortcut Ctrl-k z

Not ideal, I think we'd all prefer to have dedicated toggles for zen-moding the active group editor or file 100%, but it's close enough for now.

Here's a screenshot of it in action:

https://i.postimg.cc/MT1j5xLR/zen-mode-and-editor-group-size-toggled.png

like image 30
bevo009 Avatar answered Oct 22 '22 05:10

bevo009


VS Code Editor Full Screen Without Explorer and Terminal - Press Ctrl + K then Z (Zen Mode)

To exit from the full screen mode, press Esc two times.

like image 8
Sajan Chhipa Avatar answered Oct 22 '22 06:10

Sajan Chhipa