tgrosinger / leader-hotkeys-obsidian

Use a leader-key (tmux style) for hotkeys in Obsidian.md
GNU General Public License v3.0
80 stars 12 forks source link

Leader key results in "Leader Hotkeys: pick a command to create a keymap #31

Open KeAWang opened 1 year ago

KeAWang commented 1 year ago

Describe the bug I have my leader key set to Ctrl+a and each time I press it, I get a window popup image despite already having set the hot key (e.g. focus left panel using h). This makes it so that I can't actually execute any desired command.

Desktop (please complete the following information):

Karmenzind commented 1 year ago

Same here.

Myusuki commented 1 year ago

I don't have a solution, but I think it's because you've made a hotkey to open the modal popup window to register for hotkeys. Can someone please help us with setting our leader keys?

alexfertel commented 1 year ago

Same.

alexmsmartins commented 1 year ago

I have the same problem

Also, when I press Hotkeys in image the only configuration that appears is Leader Hotkeys: Open Register Modal

I was expecting to see something like `Leader Hotkeys: Leader to be able to assign it Ctrl-a.

image

On the other hand, when I press Options in the same screen, I get image which allows me to pick a command to create a keymap.

So, I cannot see where I can configure the Leader Key itself.

Any help (or a fix) would be greatly appreciated.

nsapse commented 1 year ago

Also having this problem

aseyq commented 1 year ago

Same here. There is no way to set the leader key. Leader hotkeys 0.2.1 Obsidian 1.4.12 And I am using Windows 11

hendrikmi commented 10 months ago

+1

namefailed commented 6 months ago

+1

blurm commented 5 months ago

+1 Is this project abandoned?

JZsmitty commented 4 months ago

To anyone still wanting an answer to how to get a leader key working. This plugin doesn't allow you to map a leader key. You have to use the vimrc plugin for that. You then put an .obsidian.vimrc file in the root of your obsidian vault. For instance, C:\ObsidianNotes\<Vault Folder Name Here>\.obsidian.vimrc

Once you have done this, you still can't map a <leader>, but you can do something that is very close.

unmap <S-Space>

exmap openlink obcommand editor:open-link-in-new-leaf
nmap <S-Space>o :openlink

Notice that I am using Shift + Space as if it were my leader key. I have never been able to get <Space> by itself to work. But '' is really close. So in other words, just don't map a leader key and then use the equivalent key in every map.

Here is a good .obsidian.vimrc example that will give you a better idea of how to map commands in Obsidian. It saved me a lot of time. They use the , key as if it was their leader, which I don't prefer. Shift + Space is nearly as fast as Space and still feels smooth to my habit of pressing Space. https://gist.github.com/kxxoling/dcc1c3a897e6735989f32b55ef069136

NOTE: Any key combination you put in your .obsidian.vimrc you will want to remove from Obsidian's default hotkey bindings if it already exists there.

Lastly, I've never been able to get this Leader-Hotkeys plugin to work properly. So, I uninstalled it.