Support for hotkeys using <leader> key

Use case or problem

To set Hotkeys using space key

Proposed solution

Add support for space key for set new hotkeys

Current workaround (optional)

Related feature requests (optional)

Space key never conflicts with OS hotkeys and is also used by me in my neovim config, so it would be much more convenient for a lot of people

Example of Key binds

space → leader

leader + h → to split horizontally
leader + v → to split vertically

1 Like

Are you talking about Vim key bindings? Or do you mean you’d like this to happen in regular Obsidian?

For the CodeMirror Vim bindings, it looks like the concept is at least possible: possible vim leader key work-around? - #4 by benhormann - discuss.CodeMirror

In regular Obsidian, the space key would conflict with… ya know, typing space. :slight_smile:

As a Vim user, I like the concept though.

Alternative idea: Ctrl-P brings up a command palette. It could be cool to have some kind of alternate command that brought up a macro palette.

Trigger it, then type an alphanumeric key = thing you define, composed of potentially multiple commands.

1 Like

So how do I change the VIM key binds in Obsidian?

VSCode has a similar approach, they use ⌘ K as the leader prefix, follows another one or two keys to trigger a command, for example, the default keybinding for “Fold all” is ⌘ K, ⌘ 0

1 Like

Try searching the forum for “vimrc”. I am pretty sure some people found a way to customize some of it. (I never did.)

And just keep this context in mind: the Vim bindings are provided through that CodeMirror project I linked to. If you google things, that will be important.

Anyway will obsidian support a lua config for vim binding as I use neovim

No, the Vim bindings are not a real implementation of Vim, let alone an implementation of Neovim. Maybe it’s possible to do something like that with the API, but I wouldn’t expect Obsidian support for that.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.