Vscode: Maximize current file/tab/editor

Created on 8 Dec 2016  Â·  73Comments  Â·  Source: microsoft/vscode

  • VSCode Version: 1.7.2
  • OS Version: Linux Mint

I've looked a bit but couldn't find a solution. Is there a way to toggle maximize (full screen) only the current tab/file? Even if there is split editor, it shouldn't display it, only the current file/tab.

Thanks

feature-request layout workbench-editors

Most helpful comment

You can use this command to make the active editor maximum width and hide the side bar:

image

All 73 comments

@dfroze there is a new "Zen Mode" coming up which is maybe what you want?
Can you try to reproduce with our nightly insider builds? You can give our preview releases a try from: http://code.visualstudio.com/Download#insiders

Thank you @bpasero . I tried the insiders build:
Version 1.7.2
Commit 7ba55c5860b152d999dda59393ca3ebeb1b5c85f
Date 2016-11-21T22:14:18.217Z
Shell 1.3.8
Renderer 52.0.2743.82
Node 6.5.0

But couldn't find the zen mode (not in the menu bar, keyboard shortcuts conf or showCommands bar). And the full screen is the same as the release one.
Where can I find the nightly builds? Or where can I find the build you mentioned?

@dfroze that is not the insiders build, it should be Version 1.8.0!

The Zen Mode will not maximize only the current file/tab but instead, the entire window with all groups/editors, which I prefer by the way :smile:

Maybe a setting to accomplish what @dfroze is asking?

what's @dfroze talk about is called maximize-panes in _Atom_,

this is so important that _Eclipse_, _Sublime Text_ . . . also have this feature

i could not have this functionality when dev 😨

see how it work by this

Yeah the problem with zen mode is when switching application tabs, you can't toggle onto the zen mode on mac. I find this makes the feature basically unusable. I want Zen mode without fullscreen.

Yes, this would be great to have. One example when this would be useful: three editor panes open, then open the Settings. Now the Settings are displayed in a completely unusable way (on my screen at least).

Note, that this toggle and the zen mode toggle should operate independently.

You can use this command to make the active editor maximum width and hide the side bar:

image

+1 for this issue:
Atom -> https://github.com/santip/maximize-panes
SublimeText -> https://github.com/jisaacks/MaxPane

+1

+1!

+1

This is currently also my main one missing feature in VS Code, since I learned using "maximize panel" in tmux with ctrl + <space> + z

@bpasero that's handy, but heavy-handed.. need to be able to restore layout afterwords.. do you know of a good way to at least un-maximize an editor group perhaps?

@Rosseyn there is also:

image

+1

That could definitely help!

On Tue, Mar 20, 2018, 12:53 AM Oleksandr Shlinchak notifications@github.com
wrote:

+1

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/vscode/issues/16927#issuecomment-374505819,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAS3eeXMrSoYmA8QDGC2yu9oazFog2FOks5tgLV9gaJpZM4LH3BS
.

This is the main feature I'm missing in VS Code. In Atom, I can maximize the source markdown pane and then toggle between source and preview like it's a live wysiwyg preview. Scrolling stays in sync too.
In VSCode, I can't maximize the source pane. So, this doesn't work.

@bpasero, Maximize Editor Group + Even Editor Group Widths is a decent compromise as you suggested, with the caveat that it's not "togglable" since there's no context to latch onto. See: #24163. The result is you need to use different keystrokes to flip between the two. cc @Rosseyn

Maximize/restore by double click on file name in header would be great.

@neminovno @utilityboy As a relative newcomer to vscode from atom, I too was trying to figure out how to emulate atom's 'maximize-panes' behavior. One of the first things I tried was to double click the tabbed filename to see if that would work. Well it didn't, but from an intuition standpoint I believe that would be the best way to handle this needed feature/ability.

Using the command panel is all well in good, but for everyday usage behaviors like this (_maximize/restore panel size_) should be baked directly into the editor and in a clickable fashion.

Up?
Really need this feature 🙌

+1

IGNOREME:
I am commenting here so I can easily find this issue again in the future, since I can't do that by subscribing alone. Sorry for the noise.

+1

This becomes even more important now that we have wonderful grid layouts and need to focus work on a particular file. Using the mechanism to maximize an editor group leaves with an oddly compressed layout.

This is a killer feature for me as well!

+1

This used to work for me just fine in VSCode using View: Maximize Editor Group and Hide Sidebar. On the latest versions, it does not: that command only works once when I trigger it, so I have to retrigger it if I change to a different editor group.

Just a few months ago this worked great, I was able to toggle on this command once and it would keep maximizing whichever editor I made active until I triggered Reset Editor Group Sizes.

I miss this feature! Did grid view screw it up?

I rarely ever worked with editors of even widths. Just not enough screen real estate. I loved that switching focus with Ctrl+1 Ctrl+2 Ctrl+3 would also maximize the selected editor. Now, those only give focus to the editor, without maximizing.

My workaround is to assign a keyboard shortcut to "Maximize Editor Group", but still kind of annoyed that I need more keystrokes to get the same behavior.

Perhaps a setting to "Maximize Editor Group On Focus"?

There's this one: https://marketplace.visualstudio.com/items?itemName=wonderful.maximize-panes
I'm not fully conviced as it kinda lags and completly hide other panes (not configurable) but it's a good start.

Where is the Even Editor Group Widths option?

I can't find it.

screen shot 2018-08-02 at 13 42 52

screen shot 2018-08-02 at 13 44 35

Now is called Reset Editor Group Size

image

@zanza00 it's not the same feature!

I want auto resize editor when focus... Even Editor Group Widths and not reset the size

Especially useful when doing file comparison

I need this feature!

Another request for this feature. Miss it from Eclipse, Atom, etc. A double click of a tab should maximize that tab, and another double click should restore it back to previous layout. This should also work for any other pane, like the terminal pane.

Would really love to see this feature happen!

Example:
iTerm2
View > Maximize Active Pane

You can get fairly close to what iTerm offers with the following keybindings:

   {
        "key": "shift+cmd+enter",
        "command": "workbench.action.maximizeEditor",
    },
    {
        // note the additional `ctrl` here since we don't have a context to know if the editor is maximized
        "key": "ctrl+shift+cmd+enter",  
        "command": "workbench.action.evenEditorWidths",
    },
    {
        "key": "shift+cmd+enter",
        "command": "workbench.action.toggleMaximizedPanel",
        "when": "terminalFocus"
    },

In my opinion, the only thing missing here for the whole thing to hang together @bpasero is a command like: workbench.action.toggleMaximizedPanel for editors. If there were a toggle or a context added even, I think everybody would be satisfied. Linking this again for the newcomers to the conversation: https://github.com/Microsoft/vscode/issues/24163

@creal1976 I don't think robots have reached the level of sentience yet to be charged with harassment in a court of law. However they are trainable, and you can toss them a bone by unsubscribing from this thread for which they would happily fetch a billion times over without delay.

_You are receiving this because you are subscribed to this thread._

Is there a way to specify the width Maximize Editor Group should maximize to?
I usually have two groups which I'd like to maximize just to my line width.

@Argysh, there is no way to do this. It's a maximize which in VS Code takes up about 95% of the main editor window

I had this issue too and it bored me.
I include a fix in this extension i made : https://marketplace.visualstudio.com/items?itemName=davidbabel.Clever

+1

Double click should maxi/minimize the clicked tab, just like other IDE behavior (my oldish netbeans did it !)

Double click should maxi/minimize the clicked tab, just like other IDE behavior (my oldish netbeans did it !)

This is a very useful feature. Eclipse and JetBrains' IDEs all support it.

I'd really like to see this feature implemented. Can we bump this issue again?

I was looking for something iTerm2 does when pressed Cmd+Shift+Enter. Since this is not supported yet, this is the best solution to improve my workflow. Hope this helps to anyone. Add these to keybindings.json. Feel free to change the key shortcuts.

  {
    "key": "cmd+j cmd+j",
    "command": "workbench.action.toggleMaximizedPanel"
  },
  {
    "key": "cmd+f cmd+f",
    "command": "workbench.action.maximizeEditor",
    "when": "editorTextFocus"
  },
  {
    "key": "cmd+r cmd+r",
    "command": "workbench.action.evenEditorWidths",
    "when": "editorTextFocus"
  }

workbench.action.toggleMaximizedPanel

This is extremely useful to see search results in a bigger panel. Before this one, I was manually resizing sidebar back and forth.

_vscode_cmd+j

workbench.action.maximizeEditor

This doesn't make it fullscreen but better than nothing. This will also hide the sidebar, which is good for more room.

_vscode_cmd+f

workbench.action.evenEditorWidths

After having the command above, I wanted to find a way to revert it back to the original state. This will make panes even size, in other words, won't preserve the previous width. Not a big deal tho.

_vscode_cmd+r

thanks! @fatihacet

Another request for this feature. Miss it from Eclipse, Atom, etc. A double click of a tab should maximize that tab, and another double click should restore it back to previous layout. This should also work for any other pane, like the terminal pane.

Double click should maxi/minimize the clicked tab, just like other IDE behavior (my oldish netbeans did it !)

Correct. Intellij also have this feature, and I really miss it (at least 3x a day) while working with VSCode.

Funny thing is that this one doesn't seem to be a big technical challenge such as https://github.com/microsoft/vscode/issues/10121

This should be closed no ?
As georgefst mentionned, the feature is out since a little while now:

#72968 (comment)

Just bind your key and you're good to go

{
    "key": "ctrl+shift+x",
    "command": "workbench.action.toggleEditorWidths"
}

@misterbridge Thank you for mentioning this, best solution available now. It still bothers me that there is no way to expand to a real full screen or to be able to configure the percentage of expansion. Hopefully this will be added as well in a future update.

+1 for toggleMaximizedEditor !

+1
_(love if could double click the editor tab name, as that's what I did in Eclipse)_

Can we have "maximize editor and hide every thing except editor"? Not just hide the sider, but the panel.

FWIW, I set up the following (heavy-handed) command using the multi-command extension:

  "multiCommand.commands": [
    {
      "command": "multiCommand.closePanelAndSidebarAndOtherEditors",
      "sequence": [
        "workbench.action.closePanel",
        "workbench.action.toggleSidebarVisibility",
        "workbench.action.closeEditorsInOtherGroups"
      ]
    },
...

And then set this new "closePanelAndSidebarAndOtherEditors" command to the following:

  {
    "command": "multiCommand.closePanelAndSidebarAndOtherEditors",
    "key": "cmd+w m",
    "when": "editorTextFocus"
  },

Which is good enough for me. Would still love a single command that does this though!

I honestly don't get why workbench.action.maximizeEditor is not maximizing current editor full width, this is the porpuse of maximizeEditor, no? Is there some way to reduce this minimum width of editor then, even if this is api call - I have my own extension and can make my own function, I just don't see how to change current editor width from api docs?

I'm currently using the "View: Toggle Editor Groups Sizes" and it has the most similar behaviour to MaxPane that I have found so far.

Please implement a shortcut to just see ONE tab in fullscreen... then toggle to see all the other tabs and other windows.. zen mode just makes fullscreen the whole editor and keeps the tabs. We want just one tab to be visible and fulscreen.

@telmodias well its not maximizing current editor group, hiding second, it makes it smth like 80/20% right?

Where is this sort of min-width variable for editor group is stored? Can I overwrite it in my extension?

@sandric I have not found anything else yet related to this subject, I'm happy for now with this use case although I recognise that the Sublime MaxPane plugin is a better experience. If you find anything else about this topic, I would appreciate if you could post here.

I looked a bit, it turns out its that line, so its always minimum 220px apparently:

https://github.com/microsoft/vscode/blob/f8432f8d9c1b1edd48e2b97d554e343f008e215c/src/vs/workbench/browser/parts/editor/editor.ts#L24

@joaomoreno is there any chance that can be moved to settings in future sprints, since many people asking about it here? Say Editor min width, Editor min height, Editor max width and Editor max height wdyt?

-> @bpasero

I think these values are carefully picked to leave a minimum of space to be able to grab the tab and/or to see the editor contents:

image

vs

image

Wouldn't it make more sense that a maximized editor group makes all other hidden? Similar to how the maximized panel hides the entire editor area today.

@bpasero those can be defaults, but why not give ability to change this if wanted to end users? Because of this there's currently no way to temporarily hide editor group. Say I want to maximize (100%) current editor group, then unmaximize it preserving all editors in editor group that was not visible, like described in this issue, is impossible now, right?

If we end up supporting hidden editor groups as a solution to this issue then I would rather not introduce a setting for the minimal editor size. But if enough people want to configure the minimal editor size independent from this issue then I suggest to extract that into a separate issue.

@bpasero sure, maximized should make all other hidden. I'm actually for making editor groups hideable/visible as solution to this, I just looked what the problem currently was, I was hoping to somehow overcome this from extension, but saw hardcoded dimension. Is there near future plans to add hiding for editor groups (sorry if it was already written in discussion earlier) ?

It's disappointing that such an awesome IDE doesn't have this basic feature 😞

Bump - I want to be able to use a markdown preview panel, full screen for presenting during live coding.

Hopefully I didn't miss any mention of this already, but it would be nice if there were a way for "toggling" maximization to actually preserve the original window layout when un-maximized.

Personally I'm not as bothered by the min-width display of other editors, though it is distracting. However I can't stand that the only way to revert is via "equal widths" which is emphatically not the layout I had before.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

borekb picture borekb  Â·  3Comments

omidgolparvar picture omidgolparvar  Â·  3Comments

villiv picture villiv  Â·  3Comments

shanalikhan picture shanalikhan  Â·  3Comments

NikosEfthias picture NikosEfthias  Â·  3Comments