vimium-c icon indicating copy to clipboard operation
vimium-c copied to clipboard

Mapping Navigation Keys to Default Keyboard Navigation Keys

Open Bonapara opened this issue 1 year ago • 3 comments

Desired behavior

My goal is to map Vimium C navigation keys to the default keyboard navigation keys.

For instance, I would love w to be mapped by ⌥→

It seems not to be supported, is there a workaround?

CleanShot 2024-03-07 at 12 44 18

Thanks!

Bonapara avatar Mar 07 '24 11:03 Bonapara

Sorry I can not get what do you want.

Could you explain the meanings of the two keys and what you wanted by the mapKey rule which was refused by Vimium C?

gdh1995 avatar Mar 07 '24 17:03 gdh1995

Hi @gdh1995, Thanks for your answer.

What I meant is that I want to use Mac shortcuts instead of Vim shortcuts in Visual/Edit mode.

Here are the shortcuts I'm talking about: Command–Left Arrow: Move the insertion point to the beginning of the current line. Command–Right Arrow: Move the insertion point to the end of the current line. Option–Left Arrow: Move the insertion point to the beginning of the previous word. Option–Right Arrow: Move the insertion point to the end of the next word. Shift–Up Arrow: Extend text selection to the nearest character at the same horizontal location on the line above. https://support.apple.com/en-us/HT201236#:~:text=Option%E2%80%93Left%20Arrow%3A%20Move%20the,the%20beginning%20of%20the%20document.

So I would love to map Vim shortcuts into these Mac Shortcuts in both Visual/Edit mode.

That's what I was trying to achieve with the custom key mapping, in the above example, mapping b in visual mode to ⌥→

(Now I realised I typed j instead of →)

And:

CleanShot 2024-03-07 at 18 57 53

Is not working :)

Bonapara avatar Mar 07 '24 17:03 Bonapara

No Vimium C can not change how your browser handles pressed keys.

VisualMode in Vimium C has its own shortcuts to move / extend cursors, which are basically borrowed from VIM - see https://github.com/philc/vimium/wiki/Visual-Mode

gdh1995 avatar Mar 09 '24 12:03 gdh1995