gdh1995 / vimium-c

A keyboard shortcut browser extension for keyboard-based navigation and tab operations with an advanced omnibar
https://chrome.google.com/webstore/detail/vimium-c/hfjbmagddngcpeloejdejnfgbamkjaeg
Other
3.17k stars 253 forks source link

leader keyword support #1107

Open mehulpamale opened 3 months ago

mehulpamale commented 3 months ago

Is there any support for key, for now I'm using map \p togglePinTab, but ideally I should be using <leader>p. Is there any support for this?

gdh1995 commented 3 months ago

what did the word "leader" mean?

---Original--- From: @.> Date: Sat, Mar 9, 2024 20:43 PM To: @.>; Cc: @.***>; Subject: [gdh1995/vimium-c] Custom leader key support (Issue #1107)

I could not find an api to bind leader key to a custom key(for example, space). Please guide on how can we do this?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

goosethedev commented 3 months ago

I'm also interested in this feature. The <Leader> key allows an additional layer for keybindings. It is mapped in the .vimrc using let mapleader = ",". It is usually set to comma , or space `. Then, you can map actions likemap h :nohto press,h` to clean search results.

For more info on <Leader>, refer to this online manual.

Is it possible to implement this feature?

gdh1995 commented 1 month ago

Um, Vimium C supports to bind a sequence of keys to a command, so why not use map ,h CcommandName directly?

To use space, map <space>h ... should work.

Of if you do want a meaningful prefix, you may use:

mapKey <space:n> <leader>
map <leader>h ...