Open Nimzozo opened 8 years ago
been looking for this since 2016. The first time I use vs-code. Don't know why still not implemented. Somebody, please take the initiative.
Yeah i'd also be in favor of this. Maybe with like a hot corner or something to push it out. vtools works ok, but this should be in vs code.
+1 for this Most of the time, I open side bar to global search or open a new file. In most of these cases, I only want to use it temporarily, so it would be ideal if it just pop up when I move my cursor to the left side of the window (just like dock auto hide on Mac OS)
I created a cleaned up version of the auto hide extension after getting an update to vscode to directly close the sidebar and panel (instead of forcing focus then toggling). It feels a good bit smoother than vtools https://marketplace.visualstudio.com/items?itemName=sirmspencer.vscode-autohide Requires 1.43
Interesting, Unfortunately it won't install on vscode version 1.42.1
@stefaanMLB Correct, as stated in my post it requires 1.43. I had to get additional commands added to the code base for this improved autohide
OK, Works now. Sorry, I overlooked the remark about v1.43. I love the tool already, THANKS !
I don't see a way to "star" this issue or such in order to indicate my interest in it, so I'm commenting to do so, but I also have some thoughts to add anyway...
Obviously, for those who don't want it, it should be made optional, and doesn't have to be the default option either.
Personally, I would find it very useful to be able to make the sidebar contents ("sidepane" i assume is what that's called) temporarily pop over with the mouse, then be able to dismiss when clicking back in to the editor (or anything else outside the sidepane for that matter). Heck, I'm completely ok with the behavior in VS or SSMS (with the auto-hide/pin option) where it doesn't automatically appear on hover but you have to click it first. My main point though is that my use of things in the sidebar (Explorer, etc) is almost always brief and temporary in nature, and I prefer to maximize the available code editing space, so (at least for me) it doesn't make much sense to have it persist (and thus take up editing space) when I only need it for a moment.
I realize that this may seem relatively minor when it's just an extra click/key or two to dismiss it, but my main job is software development and I often use VS Code for hours a day, so having "auto-hide" to eliminate those steps would still be pretty useful... I mean, it was apparently already deemed useful enough to add an auto-hide/pin feature to the panes in VS and SSMS, so if nothing else I would assume the same reasoning could apply to justify adding it to VS Code as well. :)
Vote for the request. Exactly the feature I am craving for.
Two years of waiting, and I hope finally we will see this feature rolling out some day!
Just use https://marketplace.visualstudio.com/items?itemName=sirmspencer.vscode-autohide
It doesn't have the following functionality: 1) Expand on hover 2) Collapse on cursor leave 3) Floating panel, without shifting the editor
@emvaized Exactly this, the reason for this is mostly for when im programming on my 15 inch laptop. Regarding to screen real estate i have vscode left and docs right. This means that annoying bar is taking like 30% of the screen real estate! (Without doing anything usefull during typing) Like emvaized said, expand on hover, collapse on cursor leave just like the gnome bar in ubuntu, or OSX. I can't believe this issue has been here for many years. What @emvaized said would be the perfect solution!
@emvaized PRs welcome. But there may very well be technical limitations preventing this.
With the new cheap ultra portables coming out... not even talking about the surface tablets... but the 14" HP x360 and the Acer Flip 513, both of which have small screens and over 13 hours of battery life... an auto hiding explorer would be nice. Also, for accessibility... we will all lose our vision soon :/
Specially for React and Vue projects that have 1000 line files instead of tons of different files.
There's really no benefit at all to having the sidebar visible on the screen while you're not using it. Especially on smaller devices where your screen real-estate is limited. All it does is add visual noise to the screen. I am pretty astounded that this is still an open issue after 4.5 years.
This extention will help you automatically hide the sidebar and terminal.
+1 Waiting for this feature from so long any latest updates on this hover functionality?
I want to emphasize that this feature should also provide a seamless experience to show the hidden panel again, without any barrier, for instance by hovering the activity bar with the mouse cursor.
I'm able to bypass the auto-hiding using this extension, but it won't allow me to show the side panel by hovering, again. This really bugs me, because I work on a portrait screen and don't have space to always show the side panel.
+1 this feature should be implemented as a default.
folks, till then use this: https://marketplace.visualstudio.com/items?itemName=DominicVonk.auto-toggle-sidebar
This extention will help you automatically hide the sidebar and terminal.
While this extension is great and very useful, I had hoped that installing it and setting autoHide.hideOnOpen
to false
would mean the sidebar was always expanded on startup, even if autoHide.autoHideSideBar
and autoHide.autoHidePanel
were false
.
This doesn't appear to be the case, unless I'm missing something, but it would satisfy at least one of @kanlukasz's desires (which I share). All I want is for the sidebar to be open (ideally to the Explorer pane) on launch! :)
I can't install anymore the extensions you mentioned: https://marketplace.visualstudio.com/items?itemName=sirmspencer.vscode-autohide https://marketplace.visualstudio.com/items?itemName=venryx.vscode-vtools VS Code version: 1.67.2
@carlos-silveira I have 1.69 and it works. try installing it as vsix file
Auto-hide is fine, but I would love to see this functionality have parity with how the Visual Studio solution explorer functions -- when set to auto-hide, it is an overlay rather than pushing the editors and being just a general nuisance.
I don't see a way of making it do that currently without it being a built-in feature.
My 2 cents, the auto-show/auto-hide feature is very interesting for people like me who codes on small screens. But IMO it has value only if it auto shows on hover.
VScode is already doing the job if you have to do some manual task like clicking somewhere or hitting a keystroke. Plus it adds no added value for small screens cause it is frustrating and boring to endlessly open/hide the same panel. It must be smooth and transparent in your journey.
The very goal of the initial demand was to be straightforward. It must insert smoothly in the programming workflow. MacOS dock is the perfect example. When you reach the edge, the dock appears and disappears when you leave. No added action. You just reach your target normally as if it were always there. In that spirit, the animation (if there is one) must be smooth and quick and the sidebar must expand above content to avoid layout shifts.
Having to choose between practicality and screen space is really getting on my nerves. This feature seems to me very important for an IDE.
In addition to @jeandat very good observations, the side bar should auto-show as an overlay, so the windows contents will not be shifted to the right when it appears.
This would be particularly helpful with Source Control view occupying the sidebar content. I like it to be quite wide to see the full branch name etc. but then it leaves little room for the file content on the right. Auto-hiding would solve that nicely!
I'd love to be able to hide it based on an action, e.g. opening a file.
edit: This is possible with a shortcut + an extension: (multi-command):
{
"key": "o",
"command": "extension.multiCommand.execute",
"args": {
"sequence": [
"explorer.openAndPassFocus",
"workbench.action.toggleSidebarVisibility",
]
},
"when": "!inputFocus && filesExplorerFocus"
},
Hey! What's the status of this issue? It's been in the backlog for almost 7 years now 🤔 cc/ @bpasero
When in zen mode, it would also be very pleasant. Just reaching the edge of the screen would show the corresponding sidebar. You can focus on code and see extra informations like the files list or the outline right when you need it. Very clean IMO.
You will need to provide a configurable threshold for the edge cause distinct use cases might need different values. For instance if your code occupy the whole width you want a very small threshold. Maybe even 0. But if you are in zen mode and you have extra space on the left and the right, maybe you want to show the sidebar very soon like at 100px or 200px of the edge.
You may want one sidebar to act that way and another to be always visible. It is probably better to make that mode an option of the sidebar.
In general, I like vscode but it lacks personalisation in that domain. I would love being able to detach the terminal too (whether I have 2 screens or not). That's the same need at heart: being able to adapt vscode to your configuration (space, number of screens, personal workflow, etc.).
Hey! What's the status of this issue? It's been in the backlog for almost 7 years now 🤔 cc/ @bpasero
The status is: they don't care 🥲
Maybe if someone propose something they can label as a "fancy AI feature" it get some attention...
Is there any PR already attached for this feature, else I would be happy to create a PR (would need some guidance though).
Would the members of VSCode need this feature to be done or this feature request would be stranded like numerous feature requests?
I too would love to see this feature; the offered extensions are limited, primarily because they hide on click instead of on editor focus and I don't like using my mouse while programming, preferring keyboard shortcuts.
It should be noted this is not just for small screens. I have a 55" monitor, but I use only a section of it for code editing, with the space around the editor for other windows. So I edit in a 1800x1400 window despite having a large 4K monitor.
@SkyaTura : I don't think it's because "they" don't care -- when there's lots to do things get overlooked, even very useful things. Personally, I think it's a little on the arrogant side to whine about software you are getting for free, even more so if you are a developer yourself and should therefore understand the demands made on a devs time and should appreciate volunteer efforts and/or a company's donations of human resources.
I understand your point, sorry if what I said war offensive in any way to anyone who has even once been related to this project.
I do understand the collective effort made to get to the product we have today, and I appreciate all teams involved in that, however, I also understand that VSCode is not an independent project maintained by a couple people living in there basements... It's not only an open project, but a full product of one of the biggest tech industries in the planet, and also rentable somehow.
There will be decision-making based on money and marketing, and a feature like this, no matter how important would be for us, if it's not relevant in this parameters, will never be priority. (unless, maybe, if a blessed soul decides to try submitting a PR)
Well, I feel that this may sound arrogant again, so I want to explicit that I'm just trying to be realistic and sometimes I don't know the right words to argument, but I honestly understood what you meant. I'm sorry in advance if that is the case on this message again, but I won't argue again because I don't want to diverge the focus on the issue subject.
I have a solution for this via autohotkey, I still like the auto hide sidebar extension as well, at least for the left sidebar, doesn't support others.
I have mapped hotkeys to map to alt-[, alt-] and alt-' that are associated w/ the left, right sidebars and the tab bar area.
toggleSidebars.ahk
#IfWinActive, ahk_exe Code.exe
Loop {
CoordMode, Mouse, Screen
MouseGetPos, xpos, ypos
If (xpos = 0) {
Send, ![
Sleep, 100
MouseGetPos, xpos, ypos
While (xpos = 0) {
Sleep, 100
MouseGetPos, xpos, ypos
}
}
If (xpos = A_ScreenWidth-1) {
Send, !]
Sleep, 100
MouseGetPos, xpos, ypos
While (xpos = A_ScreenWidth-1) {
Sleep, 100
MouseGetPos, xpos, ypos
}
}
If (ypos = 0) {
Send, !'
Sleep, 100
MouseGetPos, xpos, ypos
While (ypos = 0) {
Sleep, 100
MouseGetPos, xpos, ypos
}
}
Sleep, 100
}
#IfWinActive
keybindings.json
{
"key": "alt+'",
"command": "workbench.action.toggleTabsVisibility"
},
{
"key": "alt+[",
"command": "workbench.action.toggleSidebarVisibility"
},
{
"key": "alt+]",
"command": "workbench.action.toggleAuxiliaryBar"
},
I got my workaround by using BetterTouchTool triggers on mac. Still miss a integrated solution tho
I got my workaround by using BetterTouchTool triggers on mac. Still miss a integrated solution tho
Yea, I am about to work something out for Linux as well when using freerdp as the mouse doesn't always rest where it needs to, but on macOS & jump desktop it does seem to work even if the mouse exits outside of the window. But yea I use BetterTouchTool as well on macOS when I need to.
I think on linux the easiest solution will be to use devilspie2 and a lua based script, secondarily autokey or bash with xbindkeys and xdotool, but hoping that devilspie2 is good enough to handle it.
A follow up solution for Linux distros running under X11, not wayland. Just make sure to set your hotkeys to match in vscode.
Vi ~/sidetriggers.sh (then chmod +x the file & run it)
#!/bin/bash
# Define function to check if Code or xfreerdp app has focus
function work_has_focus() {
local wm_class=$(xprop -id $(xdotool getactivewindow) WM_CLASS | awk -F'[",]+' '/WM_CLASS/{print $4}')
if [[ $wm_class == "Code" ]] || [[ $wm_class == "xfreerdp" ]]; then
return 0
else
return 1
fi
}
# Define function to check if mouse is at left edge of screen
function mouse_at_left_edge() {
local x=$(xdotool getmouselocation --shell | grep 'X=' | sed 's/X=//')
(( x <= 1 ))
}
# Define function to check if mouse is at top edge of screen
function mouse_at_top_edge() {
local y=$(xdotool getmouselocation --shell | grep 'Y=' | sed 's/Y=//')
(( y <= 1 ))
}
# Define function to check if mouse is at right edge of screen
function mouse_at_right_edge() {
local x=$(xdotool getmouselocation --shell | grep 'X=' | sed 's/X=//')
local max_x=$(xrandr --current | grep '*' | awk '{print $1}' | cut -d 'x' -f 1)
#echo "x=$x, max_x=$max_x"
(( x >= max_x - 1 ))
}
# Define function to handle hotkey
function handle_hotkey() {
xdotool keyup Alt_L keydown Alt_L key $1 keyup Alt_L
}
# Define state variables for hotkey trigger
left_edge_triggered=false
top_edge_triggered=false
right_edge_triggered=false
# Loop indefinitely
while true; do
if work_has_focus && mouse_at_left_edge; then
if ! $left_edge_triggered; then
handle_hotkey "bracketleft"
left_edge_triggered=true
fi
else
left_edge_triggered=false
fi
if work_has_focus && mouse_at_top_edge; then
if ! $top_edge_triggered; then
handle_hotkey "apostrophe"
top_edge_triggered=true
fi
else
top_edge_triggered=false
fi
if work_has_focus && mouse_at_right_edge; then
if ! $right_edge_triggered; then
handle_hotkey "bracketright"
right_edge_triggered=true
fi
else
right_edge_triggered=false
fi
sleep 0.1
done
Honestly this seems like a weird setting. There is a keyboard shortcut to just hide the explorer (Cmd+B).
hotkey to open the sidebar, key down to the file you want to open, hit enter, file opens, sidebar closes.
why would I want to waste another action to close it again?
Is there any progress on this? Keeping the file explorer open while editing code is a waste of real estate. It also affects my focus.
Can someone share a working extension for the time being, I tried this: Auto Toggle Sidebar, but it didn't seem to work.
Can someone share a working extension for the time being, I tried this: Auto Toggle Sidebar, but it didn't seem to work.
This is the one I use: https://marketplace.visualstudio.com/items?itemName=sirmspencer.vscode-autohide
It's an extended version (by someone else) of an extension I had made a long time ago for it. (which I think I linked to years ago in this thread haha)
Can someone share a working extension for the time being, I tried this: Auto Toggle Sidebar, but it didn't seem to work.
This is the one I use: https://marketplace.visualstudio.com/items?itemName=sirmspencer.vscode-autohide
It's an extended version (by someone else) of an extension I had made a long time ago for it. (which I think I linked to years ago in this thread haha)
Hehe, nice, Thanks @Venryx . It worked like a charm, also I have more real estate now. Thanks @sirmspencer
Share before, and after results:
I hope Microsoft can fix this with the help of their AIs, if not possible by DEVs 👏
@optimbro How and why exactly should an AI be used for something that is obviously already done and only needs implementation?
@optimbro How and why exactly should an AI be used for something that is obviously already done and only needs implementation?
"Implementation" is the issue; it has not been implemented. It's already been more than 7 years. Maybe AI can help here? How? If I knew I could just send a pull request.
It would be great if one could just hover on the retracted sidebar to fully reveal it.
Looking for an auto-hide like in the Arc Browser or the Mac Dock...
Autohide (or show on hover) for the Sidebar + Activity bar would be amazing for us with vertical monitors.
I defenitly agree on that. Sidebar needs to not only hide, but appear on mouse hover, and disapear when whe mouse is anywhere else than over it. Also, would be perfect if it would not push the editors panel to the right. It should be floating in front of your code, appearing as soon as the mouse touch the left of the screen/app, and disapearing as soon as the mouse goes.
It would be even more usefull on small screen or on the go.
Isn't there any extension that does this ?
This is specially useful on vertical monitors, I don't think an extension will be able to do it as a "floating" bar, not pushing the editor panel to the right.
Current autohide extension (and forks) just toggle the visibility of the panel (usually same as doing it via hotkey).
You can search for "autohide" in extension marketplace to find them.
I would also love to be able to enable autohide mode if the window is taller than wide (vertical form factor).
A man can dream; (I guess the fact that is more than 7 years old and hasn't been closed yet gives me hope)
:-P
Would it be possible to add a option to automatically hide the files explorer after a configurable duration ?