Default to off on certain pages
As described here, I am using f7 to toggle vimium status.
Currently vimium starts in enabled state on all pages. I would like to set it to be disabled on certain pages (and then enable it using f7 if I choose to).
So, e.g., I would have a config like site: gmail.com; default state: disabled
I suppose alternatively, vimium could be set so that, on page load of certain default-disabled sites, it automatically issues an f7 keypress which would achieve the same behavior.
You may add a prefix of ^ into the Keys field of an exclusion rule, so that Vimium C will only hook the given keys on a matched page. See this:
Thanks! But what I mean is that I'd like the initial state for vimium as enabled or disabled to be configurable per website.
So, for example, I could specify a list of websites for which vimium will initially be disabled on load. Then when I want to enable it on one of those sites, I will press f7.
Currently, each time I open a website like Gmail that has its own keyboard shortcuts I always need to press f7 to initially disable vimium. I do not want vimium to be permanently disabled on these sites because sometimes I do want to use vimium (e.g., to do things that they do not have keyboard shortcuts for).
Um I'm not sure what's wrong. Please retry this:
The effect is: on a matched page (e.g. Vimium C Options itself), Vimium C is (almost completely) disabled by default, and then <f7> will make all key mappings in Vimium C work as expected, and a second <f7> can also disable them.
Yes, I have that, and it does work!
I am asking for some way to set up vimium so that it is initially enabled or disabled on certain sites. Currently vimium is always enabled when a new site is open. I'm asking how it could be set up, for example, like
Initially disabled on: gmail.com, docs.google.com
Then when loading gmail.com, vimium would be inactive until f7 is pressed
Um not sure why you said so.
In my opinion, the method above exactly matches to be initially disabled until a F7, because:
- you said
initially disabled, while Vimium C won't respond on any other keys you pressed except<f7>- so you can just think Vimium C has been "disabled" - a
<f7>does re-enable all other keys in Vimium C.
If the word disabled means to avoid "any influence on webpages", then it will be impossible to make Vimium C respond on <f7> - it must do something to listen on your keyboard actions.
If you just want a pattern to match gmail, then you may try :https://gmail.com/ and :https://docs.google.com/
I am sorry for the delay. So, say I want the following:
- on all pages, I want f7 to toggle vimium state
- on some collection of pages, (e.g., gmail, Google docs), I want Vimium to be initially disabled
- on all other pages, I want vimium to be initially enabled
How can I achieve this?
Well, just as the comment above:
- add such a key mapping rule:
map <f7> openUrl url="vimium://status/toggle/^\u0020<f7>"
-
add some exclusion rules, like these:
patterns Keys :https://gmail.com/^ <f7>:https://docs.google.com/^ <f7>
It does work! I was confused because I thought that the exclusion would persist even after toggling with f7. Thank you!