onivim / oni2

Native, lightweight modal code editor
https://v2.onivim.io
MIT License
7.77k stars 274 forks source link

Sidebar auto-hide #2621

Open micku opened 3 years ago

micku commented 3 years ago

Not sure if this would be helpful for someone else, but I usually keep almost all the interface hidden in Vim, so I have more space for editing.

Would be cool to have a setting to decide if the sidebar should be always open, or should hide itself when not focused.

Along with this, could be visually nicer if the sidebar, when in auto-hide mode, appears on top of the editor not causing splits resize or changes in text wrap.

Maybe the same could be applied to the bottom section (not sure about the correct name)?

Onivim 0.5.1-nightly (8f34) macOS 10.15.2

CrossR commented 3 years ago

I believe we already have something like this hooked up for the quickfix/location/problems toolbar bit at the bottom. If I use Ctrl-w j it will pop open, then when I leave it with ctrl-w k it will close again. Perhaps an option of that for the sidebar?

Some thought would have to be put into that though, as the sidebar has multiple entries so its possible you'd want to move left into the sidebar to select the search say, but instead you'd end up in the explorer. So bit more complicated...

Adding for the sidebar items (explorer, search, scm etc) shouldn't be too hard, but I think the sidebar itself may be a little more work.

micku commented 3 years ago

I believe we already have something like this hooked up for the quickfix/location/problems toolbar bit at the bottom. If I use Ctrl-w j it will pop open, then when I leave it with ctrl-w k it will close again. Perhaps an option of that for the sidebar?

I have some binding to do the same with the sidebar (- for the file explorer, ,, for the search, ctrl-l and esc to close the sidebar), but I have no way to close it when I make actions that "leave" the sidebar, ie. opening a file from the file explorer.

Some thought would have to be put into that though, as the sidebar has multiple entries so its possible you'd want to move left into the sidebar to select the search say, but instead you'd end up in the explorer. So bit more complicated...

I see the same issue with the bottom bar, isn't it? TBH I still don't know how to move between the bottom bar sections. If I'm not wrong using ctrl-w j doesn't get you always in the same section (which makes it unusable for me).