Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Add configuration to specify URLs where insert mode is invoked on load #3272

Closed
benwoodward opened this issue Mar 18, 2019 · 4 comments

Comments

@benwoodward
Copy link

It'd be useful if any URLs matching https?://www.youtube.com/* would load with insert-mode activated so you don't have to toggle it for every video.

@gdh1995
Copy link
Contributor

gdh1995 commented Mar 19, 2019

The "Excluded URLs and keys" on Vimium Options page may help.

@smblott-github
Copy link
Collaborator

Agree with what @gdh1995 recommended, but see also this.

@gdh1995
Copy link
Contributor

gdh1995 commented Mar 21, 2019

BTW, I have a customized version of Vimium (https://github.com/gdh1995/vimium-c), and I've added 2 new features: "whitelist of hooked keys in exclusion rules" and "command to toggle Vimium's status", so you may have a try.

Configure on the options page:

  • add an exclusion rule
    • its "patterns" can be what you like, (if a pattern starts with "^", then it's a regexp)
    • the "keys" should start with a "^", and all others are auto parsed and splitted by spaces
      • each unit (split by spaces) will be a (composed) key which will be hooked by Vimium C
      • all other keys will be passed
    • let's say the keys is "^ <f9> <f10>" for a page of "^file:///D:/"
  • add some key mappings including:
    • map <f9> openUrl url="vimium://status\u0020enable"
    • map <f10> openUrl url="vimium://status\u0020reset"
    • map <s-f9> openUrl url="vimium://status\u0020disable"
      • warn: if disabled, no key mappings will be in use, so it can be re-enabled only from the popup page / omnibox "v" URLs.

Usage examples:

  • open file:///D:/ and press other keys except <f9> or <f10>
    • Vimium does nothing
  • press <f9> and then press f, so Vimium will show link hints
  • exit link hints mode and presss <f10>, so Vimium will be reset to the initial "white-list-of-hooked-keys" mode.

Wiki: https://github.com/gdh1995/vimium-c/wiki/Enable-or-Disable-all-frames-by-a-shortcut

Update: as said in https://github.com/gdh1995/vimium-c/wiki/Enable-or-Disable-all-frames-by-a-shortcut#how-to-switch-between-two-statuses , now my Vimium C supports vimium://status/toggle-enabled and vimium://status/toggle-disabled to toggle between statuses using only a same key.

Is it enough? Any ideas are welcomed.

@philc
Copy link
Owner

philc commented Jan 13, 2024

Closing due to inactivity.

@philc philc closed this as not planned Won't fix, can't repro, duplicate, stale Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants