|
I often want to format text to a length, so I do Is it possible I bind these commands to keys directly? Essentially like |
Answered by
71
Apr 30, 2022
Replies: 1 comment
|
What you did was supposed to work, but did not work as {
"key": "ctrl+alt+w",
"command": "dance.run",
"args": {
"commands": [
[".selections.pipe", { "input": "#fmt -73" }],
[".edit.insert", { "register": "|" }],
]
}
}For that particular case, though, 57fc476 changes the way composite commands work so that the |
0 replies
Answer selected by
losnappas
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What you did was supposed to work, but did not work as
dance.selections.pipe.replaceexpands tocommands([".selections.pipe"], [".edit.insert", { register: "|", ...argument }]), and therefore theinputwas only given to.edit.insert. To fix this, you can write{ "key": "ctrl+alt+w", "command": "dance.run", "args": { "commands": [ [".selections.pipe", { "input": "#fmt -73" }], [".edit.insert", { "register": "|" }], ] } }For that particular case, though, 57fc476 changes the way composite commands work so that the
inputis passed to the first command, in this case,selections.pipe, so your example will work with no changes.