philc / philc/vimium

Feature request: Allow keyboard shortcuts with modifier keys to be used at any time

Open
#4,109 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I have been quietly maintaining a minor fork for nearly 8 years which does this successfully, so I figured it was worth sharing the idea here to see if it makes sense to clean up and integrate upstream.

Today, as in Vim, Vimium users have to manually switch between insert and command modes if they wish to issue a command while typing in a textbox. This requires some cognitive overhead and additional keystrokes. It is, of course, a defining feature of Vim, but nearly every other popular editor uses a modeless approach, using modifier keys (ctrl, alt, etc) to distinguish keyboard shortcuts from typed text. My humble proposal is to support the same convention in Vimium for those who wish to benefit from Vimium features without managing modes.

There are several ways this might be implemented. The most conservative approach would be to simply allow keyboard shortcuts that contain modifier keys to be used in insert mode -- or at least provide this as an option to the user. This would work well for users who want to have some commands available everywhere, but still wish to have modes. A more radical approach (the one taken in my fork) is to give the user an option to completely disable insert mode. In this case, they would need to use modifier keys for all keyboard shortcuts (and this could be enforced to avoid infuriating users). The major advantage of this approach is that it frees the user from having to think about modes at all.

If this is something you are interested in, we could discuss what it would take to support this cleanly in Vimium. My fork is three years out of date and I simply disabled the insert mode and number prefixes entirely and updated the shortcut defaults. I understand we would need a more surgical approach here.

Finally, I want to note that I do appreciate the irony of a proposal to support disabling the defining Vim UI convention from an extension called Vimium! But practically speaking, I suspect that many of your users love the extension because of all the helpful functionality it offers, not because of this modal UI convention. For my own part, I use my fork in combination with a voice control system, for accessibility reasons. It is enough cognitive overhead using voice control as it is, so it's very nice to not have to think about these mode switches.

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.

Research direction

Start by reviewing Vimium's existing insert-mode and keyboard-shortcut handling, then compare the proposed modifier-key and mode-disabling approaches. Done requires an agreed behavior and a surgical implementation that lets users invoke the selected modifier-key shortcuts while typing, without breaking normal text entry.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
accessibility, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.