mirror of
https://github.com/ulyssa/iamb.git
synced 2026-04-03 08:19:08 -06:00
Add support for custom key macros #322
Labels
No labels
admin
bug
bug
bug
bug
bug
bug
bug
debugging
documentation
documentation
documentation
documentation
e2ee
e2ee
e2ee
e2ee
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
experimental
experimental
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
image
image
image
modalkit
modalkit
modalkit
modalkit
modalkit
modalkit
modalkit
modalkit
modalkit
modalkit
modalkit
modalkit
modalkit
modalkit
modalkit
modalkit
modalkit
modalkit
modalkit
modalkit
perf
perf
perf
perf
ratatui
releases
ui
ui
ui
ui
ui
ui
ui
ui
ui
ui
ui
ui
ui
ui
ui
ui
ui
ui
ui
ui
ui
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github/iamb#322
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ulyssa on 3/10/2024
This adds a
"macros"field toconfig.jsonwhich allows specifying custom mappings from one set of keys to another. This allows writing something like the following to mapjjto<Esc>in Insert mode:The following names can be used to refer to the different modes:
normal/nfor Normal modeinsert/ifor Insert modevisual/vfor Visual modecommand/cfor Command modeselectfor Select modeoperator-pendingfor Operator Pending modeMultiple modes can be specified together using
|to put a mapping in all of them. For example,"insert|command"or"i|c"could be used in the above example to mapjjin both Insert and Command mode.I've called this
"macros"since they'll behave like macros: a{count}argument will repeat the mapping (<Esc>in the above example), and not provide an argument to it. I have plans for a separate way to specify keybindings in the future using expressions that generate anActionthat should help anyone who needs to specify something that takes an optional count or register argument.