I assume you already know about Shift-Esc to temporarily disable vimperator. So I wrote how to disable vimperator based on your current location.
First, the solution:
autocmd LocationChange .* js modes.passAllKeys = false autocmd LocationChange mail\\.google\\.com js modes.passAllKeys = true autocmd LocationChange www\\.google\\.com/calendar js modes.passAllKeys = true autocmd LocationChange www\\.google\\.com/reader js modes.passAllKeys = true autocmd LocationChange mail\\.google\\.com/tasks js modes.passAllKeys = false
This filter is gMail, gCalendar, gReader, but not gTask.
The solution I gave is a cascading approach, when you define all websites to enable vimperator, then it selectively turns off for each website. Thus, although gTask uses the same parent site as gmail, it is activated by vimperator.
Now the explanation:
These commands go into your .vimperatorrc in your home directory. You can change the location of .vimperatorrc to
source! *directory*
in the .vimperatorrc file, but by default it is the .vimperatorrc file in your home directory. (% userprofile% on Windows)
Alternative solution:
autocmd LocationChange .* js modes.passAllKeys = /mail\.google\.com/.test(buffer.URL)
* Pay attention to backslashes to avoid periods.
The problem with this approach is that only the last line of the command with autocmd will work. The value of the last autocmd command overwrites the first. Thus, as a result, you get a logical operation on the command:
autocmd LocationChange .* js modes.passAllKeys = /(mail\.google\.com|google\.com\/reader)/.test(buffer.URL)
As you can see, this can get complicated when you have many sites that you want to filter.
Documentation: http://vimperator.sourceforge.net/help/vimperator/autocommands.xhtml
Solution source: http://code.google.com/p/vimperator-labs/issues/detail?id=406
Forethinker Feb 21 2018-12-21T00: 00Z
source share