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

Created on 18 Mar 2019  ·  3Comments  ·  Source: philc/vimium

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.

Most helpful comment

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: https://github.com/gdh1995/vimium-c/releases

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.

Is it enough? Any ideas are welcomed.

All 3 comments

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

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

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: https://github.com/gdh1995/vimium-c/releases

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.

Is it enough? Any ideas are welcomed.

Was this page helpful?
0 / 5 - 0 ratings