philc / vimium

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

Vomnibar scroll with <c-n>, <c-p> as in default vim #3775

Open hynky1999 opened 3 years ago

hynky1999 commented 3 years ago

Is it possible to implement scrolling with , in vomnibar ? I was unsuccessful with mapping. The biggest problem for me is getting over chromium default shortcut .

erietz commented 2 years ago

I am also curious if it is possible to map keybindings while in the vomnibar. I would like to disable <c-k> and have it be the default bindings for the browser. I use <c-k> to kill text to the end of the line.

gdh1995 commented 2 years ago

mapkey should also work on Vomnibar.

erietz commented 2 years ago

@gdh1995 I have just tried using mapkey to remap a key and it appears to do nothing while in the vomnibar. Could you provide a working example of a remapping?

gdh1995 commented 2 years ago

Um sorry, I reviewed the code and found only those mapKey which are to <c-[> can work on Vomnibar.

You may try my customized version of Vimium, named Vimium C (https://github.com/gdh1995/vimium-c), and its mapKey supports pre-mode and all-mode usages (https://github.com/gdh1995/vimium-c/wiki/Use-in-another-keyboard-layout) .

erietz commented 2 years ago

凉, I will try it out!

EDIT: mapKey <c-k> <space> works for me on Vimium-C to get rid of the default c-k behavior. This allows to kill the rest of the line in the vomnibar. Also, I don't know Chinese, but that should say "cool".

gdh1995 commented 2 years ago

@erietz Thanks for your encouragement. And here the Chinese translation of "cool" is (PinYin: "ku4", just like cool's kuːl)