Vimium + jupyter-vim-binding

Open
#2,577 7 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript
Domain
tooling

Research direction

Start by reviewing Vimium's key-event handling and configuration behavior in the context described: jupyter-vim-binding receives Escape only after Vimium processes it. Compare the proposed URL-specific Escape exclusion with a configurable global toggle, and define which behavior should be supported before implementation; done means JVB can retain Escape in insert mode without breaking Vimium elsewhere.

Written by the indexing model from the issue text.

Description

Chrome version: 59.0.3071.115 (Official Build) (64-bit)
Vimium version: 1.59

First of all, I'm really enjoying Vimium - thanks for all the hard work!

That said, I'm having trouble getting Vimium to work well with this: https://github.com/lambdalisue/jupyter-vim-binding, and I wanted to see if there is a solution. I hope this isn't too niche, but it is likely that similar considerations apply to other Chrome-based sites or tools that use vim bindings.

The basic problem is that Vimium and jupyter-vim-binding (JVB) disagree about what basic keys - h, j, k, l, etc. - should do. For the most part this is fine: Vimium is kind enough to ignore certain keys of my choosing, and I have been able to resolve nearly all of the conflicts to my satisfaction. The lone exception is the escape key when in JVB's insert mode. Vimium thinks that the escape key should escape the cell (resulting in JVB entering its "Jupyter mode") while JVB thinks that the escape key should stay within the cell but enter "Vim command mode". (JVB reserves shift-escape for exiting from insert mode or vim command mode into Jupyter mode). I agree with JVB's opinion, but of course Vimium wins because it gets the first pass at all key stroke events.

Things I have tried:

  • Entering Vimium's insert mode. Unfortunately this doesn't work because it is disabled upon entering a cell; it is also disabled by the escape key if I am not mistaken.
  • Rebinding / unmapping the escape key in Vimium. Unfortunately it doesn't appear that Vimium supports syntax for manipulating the escape key.

Possible solutions:

  • Add syntax in Vimium to exclude the escape key for specific URL(s). This would in some sense be ideal - does it already exist?
  • Provide Vimium with a configurable global on/off toggle key.

I am of course open to other ideas. Thanks in advance!

Dominant language
JavaScript
Stars
27k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from philc/vimium

All issues in philc/vimium

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.