Closed qadzek closed 1 year ago
Yeah... I'll add configuration. Although, it only accepts single key bindings now. I have to add key sequence binding as well anyway, because I'm running out of single keys for new features.
OK, with the last two commits, it's become possible to configure key bindings, and you can also press '?' to see the current key bindings.
Thanks a lot for adding this feature.
Just a small heads-up: bind end = save
and bind home = save
isn't working on my system, even though it's showing up when I press the ?
key. Binding other keys works without issues.
Pull the latest version, and with that, change the keys to home_alternative
and end_alternative
and see whether or not it works (and let me know).
If it didn't work, run h-m-m --echo-keys
, press the "home" and "end" keys, see which code is shown on the top-left corner of the screen, and let me know.
Adding _alternative
doesn't solve this issue for my system.
Pressing the Home
key shows 33 133 61 176
, pressing End
displays 33 133 64 176
.
I wasn't really planning on remapping these keys anyway, I just noticed this while experimenting a bit.
I don't know why your key codes for "home" and "end" keys are different from mine! Regardless, I've set the home_alternative
and end_alternative
values to those, in case someone needs them.
Thank you for developing this wonderful application. Sometimes I have a hard time remembering the key bindings, so it would be helpful to make them more Vim-like, or to allow the user to remap the default key bindings.
Here are some ideas how I would remap the default key bindings (a couple are conflicting with current key bindings):
e
,i
, ora
- edits the active node -> addI
andA
, whereI
puts the cursor in front of the first character,A
puts the cursor after the last characterE
,I
, orA
- edits the active node, ignoring the existing text -> usecw
orcc
insteadc
- centers the active node on the screen -> usezz
insteadv
- collapses everything other than the first-level nodes -> usezM
instead (similar to folding in Vim)V
- collapses all the children of the active node -> usezC
insteadb
- expands all nodes -> usezR
insteads
- saves with the previous file name (or asks for one if there's none) -> usew
insteadctrl+h
- hides/views hidden nodes -> I already remappedctrl+h
in Tmux to switch Tmux windows, so I can't use this feature at the momentctrl+u
in the text editor to remove everything in front of the cursor