leader-hotkeys-obsidian icon indicating copy to clipboard operation
leader-hotkeys-obsidian copied to clipboard

Once created, pressing the leader key isn't actually necessary.

Open Randy-Astle opened this issue 2 years ago • 2 comments

Describe the bug It isn't necessary to press the leader key to activate the command once it has been mapped in either normal or insert Vim modes.

A couple of observations:

  1. Only mappings with chords work in Vim normal mode. Example: a q mapping won't activate the command, but a ALT + q (or ALT + q - without the leader) will activate the command.
  2. In Vim insert mode, non-chord mappings work, but it still isn't necessary to press the leader key. If the leader is pressed, it is inserted into the note when the command is invoked (though the mapped key is not).

To Reproduce Steps to reproduce the behavior:

  1. Create a leader key mapping
  2. Invoke the command by only pressing the mapped key(s) (as described above).

Expected behavior Expected the command to not be activated if the wasn't pressed. Expected the leader activated command to not work if in Vim insert mode.

Screenshots N/A

Desktop (please complete the following information):

  • OS: Windows 10
  • Obsidian Version: v0.14.5
  • Leader Hotkeys Version: 0.2.0
  • Editor | Vim key bindings enabled

Additional context None

Randy-Astle avatar Apr 05 '22 16:04 Randy-Astle

Currently, the plugin does not take in consideration the state of the vim mode. It seems like a implementable behaviour, if there is demand for it.

We've revamped the engine at version 0.2 , such that the plugin supports arbitrary length chords and multiple roots. There are some issues to be ironed out, still such as #23 .

What exactly do you mean by the "Leader Key"? Is it the displayed shortcut in the settings? If so, this is not used anymore, and we probably missed on removing it from the UI. That is: At the plugins settings, the 'Sequence' now fully-describes the dispatch, as opposed to before , where the dispatch was described by the concatenation of the by the assigned LeaderKey and the sequence.

I didn't really understood your first point , but does this knowledge help explain what is happening? If not, can you brief me more details?

canelhasmateus avatar Apr 18 '22 14:04 canelhasmateus

BTW, the 'leader key' concept is still mentioned extensively in the readme, which leads to some confusion....

pbienst avatar May 03 '22 07:05 pbienst