I'm a big fan of VScode's minimalist approach, but one thing is bugging me. I would like to hide editor-tab icons.
The icons are from extensions: git-lens
& hexdump for VScode
. Also the split-editor icon would be nice to hide.
Create file /Users/ (yourusername)/.vscode.css and paste there: .title.show-file-icons { display: none !important; } Change vscode settings adding: "vscode_custom_css.imports": ["file:///Users/ (yourusername)/.vscode.css"] It should hide top bar. Show activity on this post. Install: multi-command, Settings Cycler, Customize UI extensions.
For selecting icons to hide is is way easier since you can select them one by one, see above comments. To hide the Split Editor Right button, you might need something like this to escape the backslash I'm using the Custom UI extension. It looks easier to install and maintain. I installed it, activated with CTRL + P, "Enable Monkey Patch".
and to the buttons in the panel title bar: For users who have already memorized the keyboard shortcuts for these commands (and considering the existence of Ctrl-p and Ctrl-Shift-p), the buttons are kind of redundant. It would be nice to have an option to hide them as almost everything in the UI already can be hidden.
Extension Custom CSS and JS Loader
.tabs-and-actions-container .editor-actions {
display: none !important;
}
Optionally, show them on hover:
.tabs-and-actions-container:hover .editor-actions {
display: flex !important;
}
I faced the same problem and Alex's answer helped me a lot (showing the icons on hover only).
But I still had an issue, especially when coding in a small window:
Let's say I want to open the file "styles.css" using the tabs bar:
As soon as my mouse enters the tabs zone, the menu shows up (because of the hover trick) and I can't click my tab because it's below the icons:
So I came up with this idea:
Showing the icons bar below the tabs (not over the tabs) when hovering
Here is the result:
Here is how I did it:
.tabs-and-actions-container .editor-actions {
display: none !important;
position: absolute;
top: 35px;
right: 0;
z-index: 1;
background-color: #2D2D2D;
}
.tabs-and-actions-container:hover .editor-actions {
display: flex !important;
}
.title.tabs.show-file-icons {
overflow: unset !important;
}
I combined the answers of Vincent and mozlingyu to another solution: instead of hiding the buttons, move them down one level to the breadcrumb bar:
This is done using the Customize UI extension with the following configuration:
"customizeUI.stylesheet": {
".tabs-and-actions-container": {
"background-color": "inherit",
},
".tabs-and-actions-container .editor-actions": {
"position": "absolute",
"top": "100%",
"right": "0px",
"height": "22px !important",
"z-index": "1",
"background-color": "inherit",
},
".tabs-and-actions-container .editor-actions .action-item": {
"margin-right": "3px !important",
},
".tabs-and-actions-container .editor-actions .action-item a": {
"font-size": "13px",
},
".tabs-and-actions-container .editor-actions .action-item .codicon": {
"width": "13px",
"height": "13px",
},
".tabs-and-actions-container .tab:last-child": {
"margin-right": "0 !important",
},
".title.tabs.show-file-icons": {
"overflow": "unset !important",
},
}
This solution is theme-independent, so it should work for all colour combinations. The background color for the buttons is always the same as the background color of the tab bar. If you use only one static theme, you could hard-code the background-color
for the .tabs-and-actions-container .editor-actions
selector to the exact color of the breadcrumb bar for a more seamless design. However, this does not work when switching themes.
The only drawback to this solution is that the buttons overflow the rightmost breadcrumb information, but I'm fine with that.
Without extensions
cd /usr/share/code/resources/app/out/vs/workbench
sudo vim workbench.desktop.main.css # or whatever editors but vs-code
.editor-actions { display: none }
To identify class names of elements,
just press ctrl + shift p
and type toggel developer tools
Here is a better extension for this. Customize UI
Gitlens icons can be disabled within the extension settings:
https://github.com/eamodio/vscode-gitlens/issues/669#issuecomment-540975432
In Insiders v1.72 now is the ability to hide/show any of the icons on that toolbar, see /hide menuItems.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With