Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to hide editor title section entirely (tabs, breadcrumbs) #33607

Closed
faustinoaq opened this issue Aug 31, 2017 · 59 comments
Closed

Allow to hide editor title section entirely (tabs, breadcrumbs) #33607

faustinoaq opened this issue Aug 31, 2017 · 59 comments
Assignees
Labels
feature-request Request for new features or functionality on-testplan workbench-tabs VS Code editor tab issues
Milestone

Comments

@faustinoaq
Copy link
Contributor

  • VSCode Version: 1.15.0
  • OS Version: Manjaro Linux x64 Gellivara

Steps to Reproduce:

  1. Configure settings.json
{
  "workbench.editor.showTabs": false
}
  1. Tabs are hidden but tabs section still fill the space.

Reproduces without extensions: Yes

Some captures:

  1. Face to face with Vim

screenshot_20170831_111904

  1. Proposed setting:
{
  "workbench.editor.showTabs": "none | one | all"
}

With "workbench.editor.showTabs": "none" then

screenshot_20170831_112820

@bpasero bpasero added feature-request Request for new features or functionality workbench-tabs VS Code editor tab issues labels Sep 1, 2017
@bpasero bpasero removed their assignment Sep 1, 2017
@fabiospampinato
Copy link
Contributor

I think you might achieve what you want today via a third party extension and some custom CSS.

@faustinoaq
Copy link
Contributor Author

This extension modifies some VS Code files so use it at your own risk.

Yes, Custom CSS and JS Loader is useful and risky.

@cpxPratik
Copy link

Also is there any way to shorten height of tabs (file's tab headings), ? Tabs are noticeably tall and waste screen space. I can't find issue related to it. Surely, someone must have notice it.

@fabiospampinato
Copy link
Contributor

@faustinoaq there's actually barely any risk involved with it. In case anything breaks a simple re-installation of VSC would fix it.

@cpxPratik Unless they fix #459 the only option remains to use the extension.

@skyhirider
Copy link

Has this been added yet? The more space for actual text the better.

1 similar comment
@TwatBurglar
Copy link

Has this been added yet? The more space for actual text the better.

@thany
Copy link

thany commented Aug 28, 2018

Second that.
The tabs are useless to me. They waste valuable screen real estate. The open files show in the side bar perfectly fine.

@charlesferreira
Copy link

Still waiting for this feature. I really love other editor's ability to go full screen and zero bars/tabs/menus distraction. I can achieve that in like Jetbrains' IDEs and it's totally awesome.

Please, guys. I'm loving VS Code, but the tab bar, beyond not being able to hide them, is too large!

@well1791
Copy link

👋 Hi everyone!

🤔 I have some (silly 😅) workaround if you just work with one project all day (and you don't want to bother yourself with Custom CSS and JS Loader plugin).

  1. Toggle Developer Tools
  2. Inspect the row
  3. Delete the element 🤣

I haven't seen any errors yet 🤷‍♂️ but (as you have already guessed), it only works during your current session.

Anyway, I just hope the VS Code team still consider this feature-request 🙏

@DimitarNestorov
Copy link

@well1791 don't you have an empty space between your code and terminal? Like so:
image

Not really a workaround, you're not getting that screen real estate back

@well1791
Copy link

@DimitarNestorov good catch! 👏

Didn't noticed that! However, it doesn't bother me as I don't look at that part too often.

@fuzihaofzh
Copy link

You can use the plugin "Custom CSS & JS" and use the following code

.title.show-file-icons {
    display: none !important;
}

@thany
Copy link

thany commented Oct 8, 2018

That's not really a solution. The extension needs permission for VSCode to change itself, which is frankly terrifying. This needs a proper fix.

@therealpeterhua
Copy link

Agreed, huge waste of space right now. A related issue, and possible alternative solution: #42253

3 similar comments
@therealpeterhua
Copy link

Agreed, huge waste of space right now. A related issue, and possible alternative solution: #42253

@therealpeterhua
Copy link

Agreed, huge waste of space right now. A related issue, and possible alternative solution: #42253

@therealpeterhua
Copy link

Agreed, huge waste of space right now. A related issue, and possible alternative solution: #42253

@isti115
Copy link

isti115 commented Nov 10, 2018

Has anyone figured out how to actually make that space usable after hiding the tab div?
I couldn't make it fill the extra height using just CSS, so I guess that something is calculated in JS that would need to be changed as well.

@isti115
Copy link

isti115 commented Nov 12, 2018

Wow, I've become so desperate over the last few days that I finally managed to write a script that pushes the window off the top of the screen, thus hiding the (to me useless) title bar and tab bar!
All the other elements (Activity Bar, Status Bar and maybe minimap, but I like to keep that one around sometimes) can be hidden in VSCode, so I guess that this is solved for me as long as the window is at the top of the screen. :)

For reference here is the AutoHotKey code that worked for me, but you could call the DLL from any of your favorite languages.

SetTitleMatchMode, 2
WinTitle := "Visual Studio Code"

; --- WinMove version

; WinMove, %WinTitle%, , 0, -64, 1280, 1504

; -- DLL version

WinGet, id, , %WinTitle%
Result := DllCall("SetWindowPos", "uint", id, "uint", HWND_TOP, "Int", 0, "Int", -64, "Int", 1280, "Int", 1504, "UInt", 0x400)

ps.: The 0x400 corresponds to the SWP_NOSENDCHANGING flag that prevents the window from realizing that it has been resized and jumping back on screen.

@OceanBelongsToMe
Copy link

pleaseeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee

@OceanBelongsToMe
Copy link

@tejasvi can you tell me your solution?

@Aqa-Ib
Copy link

Aqa-Ib commented Apr 30, 2022

At least let the user hide it on Zen Mode.
Thanks

@laralove143
Copy link

better solution, have a pixel number setting for tab size instead of just normal/large.. this way we can just put 0 to disable it, this is how other sizes are handled anyway like the scrollbar, anything limiting this?

@SichangHe
Copy link

Working workaround (hack)

I just spent a few hours and final have a working configuration using Custom CSS and JS Loader.
Disclaimer: this configuration is licensed under an MIT license (don't blame me if you get hacked! 😄)

I'll paste it here as well:

/* # Hide tab bar and float utility buttons to the right. */
#workbench\.parts\.editor>div.content>div.grid-view-container>div>div>div>div.monaco-scrollable-element>div.split-view-container>div>div>div.title.tabs.show-file-icons {
    float: right;
    z-index: 1;
}

#workbench\.parts\.editor>div.content>div.grid-view-container>div>div>div>div.monaco-scrollable-element>div.split-view-container>div>div>div.title.tabs.show-file-icons>div.tabs-and-actions-container>div.monaco-scrollable-element>div.tabs-container {
    display: none;
}

/* ## Force the editor area to use full height. */
#workbench\.parts\.editor>div.content>div.grid-view-container>div>div>div>div.monaco-scrollable-element>div.split-view-container>div>div>div.editor-container,
#workbench\.parts\.editor>div.content>div.grid-view-container>div>div>div>div.monaco-scrollable-element>div.split-view-container>div>div>div.editor-container>div>div,
#workbench\.parts\.editor>div.content>div.grid-view-container>div>div>div>div.monaco-scrollable-element>div.split-view-container>div>div>div.editor-container>div>div>div.overflow-guard>div.monaco-scrollable-element.editor-scrollable.vs,
#workbench\.parts\.editor>div.content>div.grid-view-container>div>div>div>div.monaco-scrollable-element>div.split-view-container>div>div>div.editor-container>div>div>div.overflow-guard>div.monaco-scrollable-element.editor-scrollable.vs>div.lines-content.monaco-editor-background>div.view-lines.monaco-mouse-cursor-text {
    height: 100% !important;
}

#workbench\.parts\.editor>div.content>div.grid-view-container>div>div>div>div.monaco-scrollable-element>div.split-view-container>div>div>div.editor-container>div>div>div.overflow-guard {
    height: 100% !important;
    position: absolute;
}


/* # Show the bottom bar even if it is toggled off. */
body>div.file-icons-enabled.reduce-motion.monaco-workbench.chromium.nosidebar.nopanel.noauxiliarybar.maximized.vs.nostatusbar>div.monaco-grid-view>div>div>div.monaco-scrollable-element>div.split-view-container>div:nth-child(4),
body>div.file-icons-enabled.reduce-motion.monaco-workbench.chromium.nopanel.noauxiliarybar.nostatusbar.maximized.vs>div.monaco-grid-view>div>div>div.monaco-scrollable-element>div.split-view-container>div:nth-child(4) {
    bottom: 0px;
    height: unset !important;
    top: unset !important;
    display: unset;
}

#workbench\.parts\.statusbar {
    height: unset !important;
}

/* ## Show the horizontal scrollbar */
#workbench\.parts\.editor>div.content>div.grid-view-container>div>div>div>div.monaco-scrollable-element>div.split-view-container>div>div>div.editor-container>div>div>div.overflow-guard>div.monaco-scrollable-element.editor-scrollable.vs>div.visible.scrollbar.horizontal,
body>div.file-icons-enabled.reduce-motion.monaco-workbench.chromium.nopanel.noauxiliarybar.maximized.vs.nostatusbar.nosidebar>div.monaco-grid-view>div>div>div.monaco-scrollable-element>div.split-view-container>div:nth-child(3)>div>div>div.monaco-scrollable-element>div.visible.scrollbar {
    bottom: 12px !important;
}

If it does not work for you, perhaps you need to delete some classes in the code above (maybe your vscode does not have those classes so the elements are not correctly selected).

  • The tab bar is hidden
  • The buttons on the right hand side floats (I find them useful)
    • To hide it completely, you want to set
#workbench\.parts\.editor>div.content>div.grid-view-container>div>div>div>div.monaco-scrollable-element>div.split-view-container>div>div>div.title.tabs.show-file-icons

to display: none; instead of float: right;

  • You need to toggle the status bar off
    • But it still shows, because I hacked it to always show (I find it useful, plus that space should have been blank anyway)
    • By toggling the status bar off, vscode is tricked to render (potentially) one more line ("solving" the problem of not rendering enough lines and having a blank area at the bottom)
  • The horizontal scroll bar is bumped up (it should have been blocked by the status bar), but only showing a little bit because I want it short. If you want it taller, set
#workbench\.parts\.editor>div.content>div.grid-view-container>div>div>div>div.monaco-scrollable-element>div.split-view-container>div>div>div.editor-container>div>div>div.overflow-guard>div.monaco-scrollable-element.editor-scrollable.vs>div.visible.scrollbar.horizontal,
body>div.file-icons-enabled.reduce-motion.monaco-workbench.chromium.nopanel.noauxiliarybar.maximized.vs.nostatusbar.nosidebar>div.monaco-grid-view>div>div>div.monaco-scrollable-element>div.split-view-container>div:nth-child(3)>div>div>div.monaco-scrollable-element>div.visible.scrollbar

to bottom: 20px !important; or something instead of bottom: 12px !important;

Hopefully, this is helpful! I got 2 more lines (had 34) in my vscode 🎉
Please give suggestions if improvements can be made. Please give proper credit if you share.

Steven Hé (Sīchàng)

@SichangHe
Copy link

Just realized that I did not support Zen mode, which many people want. Fixed it.

@kklot
Copy link

kklot commented Jun 17, 2023

I just found out that I could live with zooming out the whole windows interface until the tab height/status bar height is what you wanted (~vim tab/status bar for me), at at the same time increase the editor and terminal font size.

Only drawback is font size of other stuffs would be too small to read (extension, outlines,...), but I rarely look at them anyway. But I'd be great if we increase the font size of UI as well - anyone know where to change the UI font size?

@starball5
Copy link

Related on Stack Overflow: How to hide the VS Code bar with file name, breadcrumbs, run java, split editor and more actions?

@a-constantin
Copy link

I decided to try out vscode again today, haven't used it since the PR that added this very basic feature was rejected for reasons I still don't understand four years ago, so I guess I'll try again in a few more years.

@maxpatiiuk
Copy link

maxpatiiuk commented Aug 3, 2023

Rather than simply hiding the title section, I decided to still make the title action buttons available just in case, but without preventing the editor from occupying the rest of the area:

Screenshot 2023-08-02 at 20 16 44

CSS (for the Custom CSS and JS Loader extension) if you want to do similar:

.title.show-file-icons {
    position: absolute !important;
    top: 0;
    right: 0;
    z-index: 10;
    opacity: 0.5;
}

.title.show-file-icons:hover {
    opacity: 1;
}

.title.show-file-icons .label-container {
    display: none !important;
}

@vanyauhalin
Copy link

@benibenj, we're with you in our thoughts, do it. ❤️

@vanyauhalin
Copy link

@benibenj, we had no doubts, good job. ❤️

benibenj added a commit that referenced this issue Oct 18, 2023
Allow to hide editor title section entirely (tabs, breadcrumbs) (#33607)
@benibenj
Copy link
Contributor

Hiding the editor title is now available in our newest insider build. You can give our nightly preview releases a try from: https://code.visualstudio.com/insiders/

The workbench.editor.showTabs setting has been changed to support the following options: multiple, single, none

@kklot
Copy link

kklot commented Oct 19, 2023

Perfect
Screenshot 2023-10-19 at 12 16 41

Alex0007 pushed a commit to Alex0007/vscode that referenced this issue Oct 26, 2023
Allow to hide editor title section entirely (tabs, breadcrumbs) (microsoft#33607)
@github-actions github-actions bot locked and limited conversation to collaborators Dec 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality on-testplan workbench-tabs VS Code editor tab issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.