philc/vimium — Issue #491: Allow certain commands on excluded sites
Author: alcoheca
Created: 2012-03-01 14:42:34+00:00
State: open

I'm suggesting modifying the exclusion behaviour so that if a ```|``` separated list of commands follows the pattern, those keypresses *are* handled by Vimium. Any keypress which doesn't match a command specified is allowed to propagate to the loaded page itself, as usual.

eg Allow ```nextTab``` and ```prevTab``` commands when viewing a gmail tab. Totally disable on bbc.co.uk

http*://mail.google.com/*|nextTab|prevTab
http://*.bbc.co.uk/*

Insert mode, and escape would ALWAYS be ignored by vimium for excluded sites.

Having just started looking at the code, one way I'm thinking is by modifying ```isEnabledForUrl``` in ```background_page.html```, and calling it for every keystroke, not just on page load. Or do you have another suggestion/preference?

I'd love to get this running for myself, happy if other people think it's usful too!