Oni: fzf integration broken due to non-vim keyboard accessibility

Created on 31 Jan 2018  路  6Comments  路  Source: onivim/oni

I believe #1376 broke fzf integration. See image below:

screen shot 2018-01-31 at 10 57 08 am

bug

Most helpful comment

A bigger concern or rather another concern which I've realised is that generally oni normal mode bindings don't account for operator mapping's / mode which in this case using something like surround.vim tpope's hugely popular plugin or easymotion which recommends <leader>s bindings these trigger the accessibility ui.

I think aside from chorded bindings it would also be very useful to have a isOperatorMode boolean which should be checked as well as isNormalMode

All 6 comments

Ah thanks for testing out the latest master and catching this / logging the issue, @josemarluedke !

The keybinding I have set up for this (s and S, normal mode) is pretty aggressive. It seems like we'd have a few options to improve this:

  • Improve the filter logic - I'm not sure if there is a better way to check for fzf mode?
  • Use more conservative key bindings

As a workaround, In the meantime, if you add these to your config.js, it will remove Oni's default behavior for these:

    oni.input.unbind("s")
    oni.input.unbind("S")

@bryphe a potential solution would be disabling the binding if the active buffer name included term or fzf but as you suggest that's unlikely to be a good longterm fix as I'm sure there are loads of edge cases, btw despite being an issue just wanted to say 馃槏 its sooo cool!!, but yeah seeing the same, it would be great to have chorded bindings (not sure that's a word I mean like ,s for example).

I saw on the electron repo that they use in the docs a lib called mousetrap which allows for those sort of bindings not sure if that'd be applicable here

Ah ya, good catch - we actually don't handle the terminal mode correctly, we just treat it as normal mode. I think we actually start handling terminal mode, this will work better.

btw despite being an issue just wanted to say 馃槏 its sooo cool!!

Thanks! 馃槃

but yeah seeing the same, it would be great to have chorded bindings (not sure that's a word I mean like ,s for example).

Definitely, once we have that via #1055 , it'll make life easier for some of these! mousetrap does look interesting since it handles chorded keys already... that's cool.

A bigger concern or rather another concern which I've realised is that generally oni normal mode bindings don't account for operator mapping's / mode which in this case using something like surround.vim tpope's hugely popular plugin or easymotion which recommends <leader>s bindings these trigger the accessibility ui.

I think aside from chorded bindings it would also be very useful to have a isOperatorMode boolean which should be checked as well as isNormalMode

Yes, makes sense, seems like there are a ton of collisions across the board.

I'm thinking about moving this to a more conservative binding, for now - how about Control+G? Some editors use that as goto line, but we have :<line> for that.

I implemented the switch to use Control+G in #1433 , so this should be addressed now on the latest master. Thanks again for catching it, @josemarluedke !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

akinsho picture akinsho  路  3Comments

bfulop picture bfulop  路  3Comments

timeyyy picture timeyyy  路  3Comments

Siilwyn picture Siilwyn  路  3Comments

magopian picture magopian  路  3Comments