philc / vimium

The hacker's browser.
https://chrome.google.com/webstore/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb
MIT License
23.54k stars 2.49k forks source link

Question: Spacebar to cancel? #2310

Open DavidLGoldberg opened 8 years ago

DavidLGoldberg commented 8 years ago

Didn't spacebar used to work as a way to cancel the 'f' functionality. It stopped working for me one day recently. Or did I imagine this functionality?

I have it set like that in https://atom.io/packages/jumpy so I might just be getting confused, but I'm 90% sure I had muscle memory for vimium with that...

smblott-github commented 8 years ago

The space bar has never been specifically mapped to cancel. Rather, all unmapped keys have previously cancelled link-hints mode - which happens to include space.

There's a new feature in 1.57 whereby Space now rotates the stacking order of hints (e.g., when one hint's text is obscured by another).

DavidLGoldberg commented 8 years ago

perhaps it's this... although I'll probably leave it to the experts ;)

https://github.com/philc/vimium/commit/19e1178b16fd27882c7834d66ad6597847e6baff#diff-e9abcb9ebcdb5af8e9f33651364673a1R284

What is that rotate stuff about out of curiosity? Is that a feature I'm unaware of?

DavidLGoldberg commented 8 years ago

Ah, funny timing!

smblott-github commented 8 years ago

What is that rotate stuff about out of curiosity? Is that a feature I'm unaware of?

The feature is for cases where one hint obscures another, like this:

snapshot

Space (or c-Space, for filtered hints) rotates it to this...

snapshot

DavidLGoldberg commented 8 years ago

Ah, I've never ever seen the overlap... That's a cool feature! I just tested it on this page a bit, pretty cool!

Funny thing, I actually built Jumpy before hearing about your extension! A user of it introduced me to vimium (I'm a vim + vim-mode user in Atom of course), I thought it was cool when I saw we both had landed on space for cancel.. (never realized it was for free or by accident ... I've never explored all of your functionality here. I guess I should really get around to reading all of the code)...

FYI: Jumpy leaves the labels up and flashes if the wrong key is pressed. I have the backspace functionality in there too. Fortunately I don't have to handle the z-index issue in my domain. Also, after the first char is pressed, the "irrelevant" labels/markers go away also.

Actually, Did you always have that in here or is that new?

Someone gave me a pull request recently and helped me restore my "beacon" ....Basically it flashes after you make a jump. I always thought something like that for vimium would be pretty cool. Any interest, I could explore a PR....obviously if the page loads quickly it's useless.....but there are plenty of times a brief animation would be useful.

Why? 2 reasons: 1. typos 2.* pair programming etc...

DavidLGoldberg commented 8 years ago

Have you ever taken a crack at this at the OS level? While in college (really didn't know how to program back then!) took a stab at it with X Windows System.... I had a basic prototype working: http://uix.sourceforge.net/ <--- please ignore all of the code ;) When vimperator came out... I remember being proud I "invented" the 2 letters while they had just the harder to type 3 digit numerics... hehe

DavidLGoldberg commented 8 years ago

Also, is there anyway that I can bind space to the cancel..perhaps just to the escape to get that functionality?... Although I happen to use space to go page down from time to time in the browser, so would prefer it only contextualized to LinkHints.activateMode

DavidLGoldberg commented 8 years ago

*Just discovered visual mode..... :(

You are a GOD.

ultrox commented 8 years ago

Hey Guys, I'll piggyback on this one as I dont want to open a new issue. I'm having problem making (ctrl+Space) work on me Mac OS El Capitan when I'm using number + typing words. Can you tell me what is the name of the option so I can remmap it on my own?

Found it: ctrl + Shift + Space on Mac