0
votes

Setup: I am running a fairly vanilla version of Emacs Prelude after I quit using Spacemacs some days ago (mainly because the usual evil-mode-incompatibities were grinding my gears).

Problem: I am having issues with the Emacs' movement commands, in particular because I am already getting a bit of an 'Emacs Pinky'. My current workaround is using modalka-mode with h/j/k/l bindings. What I would love is a direct mapping of <SPC>-h/j/k/l to the corresponding Emacs commands C-b/n/p/f. This would require the space-key to be some sort of modifier when held down. Is my desired behavior achievable in Emacs, and if yes, how?

Remark: I do not want to use evil-mode, since I found the incompatibilities with other packages to be overly annoying.

1
IIUC what you are asking for, holding <SPC> down and pressing h/j/k/l would be a movement, while pressing and releasing <SPC> would enter a space in the buffer? - NickD
Yes, exactly. Do you think this will be an issue? - Peter Wildemann
I don't know for sure, but it might be. I certainly don't know how to do that. - NickD

1 Answers

1
votes

If I understand your question correctly you are looking for mode called "space-chord".

It is installable with melpa or here: https://www.emacswiki.org/emacs/space-chord.el

You might want to look into key chords also: https://www.emacswiki.org/emacs/KeyChord

They are awesome, especially with evil mode. For example I have "jk" bound to normal mode instead of escape or C-[.