vimperator-labs icon indicating copy to clipboard operation
vimperator-labs copied to clipboard

Inverted :ignorekeys option

Open jonhoo opened this issue 12 years ago • 11 comments

For some sites, I would like to have normal vimperator key bindings, except a few key combinations (c on GitHub comes to mind). Globally, I might also want to ignore a few key mappings (^A for select all for example), but overall leave most vimperator bindings in place. This would be extremely clumsy in the current :ignorekeys scheme, as it would require me to enumerate every single key I don't want to ignore in the -except clause.

Instead, it would be useful to have something like :passthrough add [KEY]... {url-regexp} where only the listed keys are passed through directly to matched sites.

jonhoo avatar Oct 21 '14 00:10 jonhoo

Certainly, I've been looking for this feature since I began to use Vimperator.

shouya avatar Nov 04 '14 02:11 shouya

Agreed, I really need something like this.

pcchou avatar Nov 22 '14 10:11 pcchou

This is the only feature I miss from pentadactyl. They call it passkeys and it is worth taking a look.

I could imagine adding an option to ignorekeys (let's call it -only) that acts kinda like except but passes only the enumerated keys.

ignorekeys add -only=j,k,<Space> .

Another way would to make i work in mappings. Then you could do something like :noremap i gi which would effectively pass the key to firefox.

kevincox avatar Dec 16 '14 16:12 kevincox

I'd also be interested in having this around. Much like @jonhoo I mostly want to let a few keys pass uninterpreted by vimperator, not the other way around. I could argue that this is the most common case but I'm biased.

I had a look at the code and in order to keep backwards compatibility this requires a complementary approach storing "included" and "excluded" keys in parallel. It's a non trivial feature.

This feature requires patching the "common" code. This is shared with muttator which I don't use. Would the devs accept partial patches (common + vimperator only)?

unode avatar Feb 18 '15 16:02 unode

It would be a very helpful feature and I would certainly accept a well-written patch. A lot of also vimperator-specific code is often in "common", so don't worry about it although it would be nice, that someone using Muttator could test the patch to see if at least it doesn't completely break Muttator.

To the implementation: I also think having it as ":ignorekeys add -only c,f,x github.com" sounds like the best approach.

Also please don't forget about the documentation and NEWS entry.

Good luck and hope you succeed :)

Martin

On Wed, Feb 18, 2015 at 5:17 PM, Renato Alves [email protected] wrote:

I'd also be interested in having this around. Much like @jonhoo https://github.com/jonhoo I mostly want to let a few keys pass uninterpreted by vimperator, not the other way around. I could argue that this is the most common case but I'm biased.

I had a look at the code and in order to keep backwards compatibility this requires a complementary approach storing "included" and "excluded" keys in parallel. It's a non trivial feature.

This feature requires patching the "common" code. This is shared with muttator which I don't use. Would the devs accept partial patches (common + vimperator only)?

— Reply to this email directly or view it on GitHub https://github.com/vimperator/vimperator-labs/issues/70#issuecomment-74892887 .

maxauthority avatar Feb 24 '15 18:02 maxauthority

Any news on this issue?

mblum avatar Apr 01 '15 11:04 mblum

In case people are waiting on me, please feel free to take this. I'm not going to be able to address it anytime soon.

unode avatar May 04 '15 15:05 unode

Ahhh, I just switched from Pentadactyl, and this is definitely what I miss the most. I'll be looking into it, but I'd really like to know if anyone has found a way to do this.

Also, cancelling PASSTHROUGH mode when switching tabs would be nice if possible, or remembering which tabs have it enabled.

krompus avatar Dec 10 '15 10:12 krompus

+1 for this option

rr- avatar Jan 30 '16 09:01 rr-

+1, would be a great feature to have

clancyian avatar Apr 05 '16 15:04 clancyian

Has somebody come up with a decent -except list for GitHub?

I've tried something like :map c c<insert>c and :noremap P <insert>c, but it seems the mapping stops after the <insert>?!

blueyed avatar Aug 15 '16 11:08 blueyed