Skip to content

Rebinding <a-Z>aZ to Z #213

Answered by 71
losnappas asked this question in Q&A
Nov 17, 2021 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

That issue made me realize a few parts of Dance are still not exposed (e.g. #214, #215). I'll try to work on that. With that said, using some knowledge of the internals, I came up with the following.


map global normal <a-z> 'Z'

is

// Assign the new key binding:
{
  "key": "alt+z",
  "command": "dance.selections.save",
  "when": "editorTextFocus && dance.mode == 'normal'"
},
// Remove the previous key binding; I believe this is optional as the new
// key binding takes precedence:
{
  "key": "alt+z",
  "command": "-dance.selections.restore.withCurrent",
  "when": "editorTextFocus && dance.mode == 'normal'"
},

define-command -hidden -docstring 'Add selection or refresh selections' add-sel …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@71
Comment options

@losnappas
Comment options

Answer selected by losnappas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants