Oni: Bindings for horizontal split and new tab in QuickOpen

Created on 3 Oct 2017  路  7Comments  路  Source: onivim/oni

Currently you can open a vertical split on QuickOpen with <C-v>.

I suggest adding keybindings similar to the ones on other vim fuzzy finders (and vim-fugitive):

  • <C-S-v>: Open in a horizontal split
  • <C-t>: Open in a new tab

I can take a look at this issue later on if it's not complicated.

enhancement help wanted

All 7 comments

Would be great to have the defaults consistent with the other vim fuzzy finders.

The default key bindings are here:
https://github.com/bryphe/oni/blob/37ad0f1479d99d4b46fc745015c3a13d1b2c8569/browser/src/Input/KeyBindings.ts#L33

There's actually already one for opening in a horizontal split (quickOpen.openFileHorizontal), we just need to update the default binding for that.

The open in a new tab we don't currently have a command for, so that may need a bit more plumbing, but it would be similiar paths to the open in horizontal split / vertical split.

I can take a look at this issue later on if it's not complicated.

Cool, that would be great! LMK if you need any help or have questions.

Great, thanks for the reference, will tackle this later on.

Just something I noticed, you check for Linux or Windows to use Control and Meta for all other OSes.

I think changing this to check Mac first to use Meta and Control for others is better, e.g. would use Control instead of Meta for BSDs or other OSes that might use Oni.

Yes, good point, inverting that conditional would be cleaner, since it is only Mac that uses the meta key for this.

It seems actually each fuzzy-finder uses a different set of keybindings:

We can maintain s for the horizontal split but make these keybindings configurable. As my preference is t, v and V but may not be a good default.

I pushed #761 for new tab support.

Configurable keybindings seem not to be present on that file, so I think it would be better to add configurability later on all.

Great, thanks @badosu ! Just brought it in.

FYI, these can be overridden in the config.js via these instructions: https://github.com/bryphe/oni/wiki/Configuration#keyboard-bindings

(Basically, you can call oni.input.bind or oni.input.unbind directly from the config, just like in that file).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bryphe picture bryphe  路  19Comments

jordwalke picture jordwalke  路  25Comments

phaazon picture phaazon  路  21Comments

jordwalke picture jordwalke  路  20Comments

hkupty picture hkupty  路  27Comments