Oni: Sidebar: Improve Keybindings/Configuration

Created on 6 Feb 2018  路  7Comments  路  Source: onivim/oni

It would improve my workflow if there was a way to configure keybindings related to sidebar functionality:

  • Open/Close folders: I would use <zo> and <zc> myself, just like the folding ones on vim, as they are more easy to use than <Enter>.
  • Toggle sidebar visibility
  • Toggle sidebar left pane visibility, as the file explorer is more useful for me than the rest
enhancement insider

Most helpful comment

One thing I'd like is to bind h and l to expand and contract folders in the explorer window.

All 7 comments

Open/Close folders: I would use and myself, just like the folding ones on vim, as they are more easy to use than .

Thanks for the suggestion here! A few pieces of work we'd need to have for this:

  • Need to hook up an explorer.expand / explorer.collapse action - that should be relatively straightforward.

We'll either need chorded inputs (#1055) or an option to run the init.vim for the extended UI, and binding from init.vim, to hook up to those explorer.expand and explorer.collapse actions.

Toggle sidebar visibility

Definitely - #1387 is tracking this.

Toggle sidebar left pane visibility, as the file explorer is more useful for me than the rest

Yes, makes sense. A few options here:

  • We could have a configuration setting for having the sidebar enabled (if it's off, we'd still have a shortcut for showing the explorer window)
  • We could hide the windows, but have <C-W>h still navigate to them - if they are hidden, they would become visible once navigated. There might be some UI paradigm we could use to show the user they are 'offscreen', like show a sliver of the sidebar pane.

One thing I'd like is to bind h and l to expand and contract folders in the explorer window.

Another suggestion that would be very useful is to add a configuration setting to not display the sidebar by default. It is enabled but is not shown by default when Oni is initialized.

2049 allows now for not showing the sidebar on initialization, thanks @Akin909!

IMO if I have a particular pane open in the sidebar, clicking on the activated icon for the current pane should toggle the sidebar off. Currently clicking on the icon for current pane is a no-op.

I'll close this issue since it has a lot of old context from when the sidebar was very different.

I still think the sidebar needs a lot more polishing, but that would require a more thorough investigation on my part.

@sullyj3 Feel free to post yours as a separate issue to be tracked more easily.

I actually added a PR (#2297) for @sullyj3 request this morning, so when the build passes it can be merged.

Was this page helpful?
0 / 5 - 0 ratings