Last active
August 26, 2021 14:41
-
-
Save EdAyers/bc018025912b2315d244f28d707a0462 to your computer and use it in GitHub Desktop.
kak mirror emulation for vscode Dance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"key": "'", | |
"command": "dance.openMenu", | |
"args": { | |
"input": "mirror" | |
}, | |
"when": "editorTextFocus && dance.mode == 'normal'" | |
}, | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"dance.menus": { | |
"mirror": { | |
"items": { | |
"l": { | |
"text": "character left", | |
"command": "dance.run", | |
"args": { | |
"commands": [ | |
"dance.select.left.extend", | |
"dance.selections.changeDirection", | |
"dance.select.right.extend", | |
"dance.selections.changeDirection", | |
] | |
}, | |
}, | |
"h": { | |
"text": "character right", | |
"command": "dance.run", | |
"args": { | |
"commands": [ | |
"dance.select.right.extend", | |
"dance.selections.changeDirection", | |
"dance.select.left.extend", | |
"dance.selections.changeDirection", | |
] | |
}, | |
}, | |
"j": { | |
"text": "line down", | |
"command": "dance.run", | |
"args": { | |
"commands": [ | |
"dance.select.down.extend", | |
"dance.selections.changeDirection", | |
"dance.select.up.extend", | |
"dance.selections.changeDirection", | |
] | |
}, | |
}, | |
"k": { | |
"text": "line up", | |
"command": "dance.run", | |
"args": { | |
"commands": [ | |
"dance.select.up.extend", | |
"dance.selections.changeDirection", | |
"dance.select.down.extend", | |
"dance.selections.changeDirection", | |
] | |
}, | |
}, | |
"(": { | |
"text": "(surround)", | |
"command": "dance.run", | |
"args": { | |
"commands": [ | |
"dance.modes.insert.after", | |
{"command": "type", "args": {"text": ")"}}, | |
"dance.modes.set.normal", | |
"dance.selections.save", | |
"dance.modes.insert.before", | |
{"command": "type", "args": {"text": "("}}, | |
"dance.modes.set.normal", | |
"dance.selections.restore", | |
"dance.selections.changeDirection", | |
] | |
}, | |
}, | |
"{": { | |
"text": "{surround}", | |
"command": "dance.run", | |
"args": { | |
"commands": [ | |
"dance.modes.insert.after", | |
{"command": "type", "args": {"text": "}"}}, | |
"dance.modes.set.normal", | |
"dance.selections.save", | |
"dance.modes.insert.before", | |
{"command": "type", "args": {"text": "{"}}, | |
"dance.modes.set.normal", | |
"dance.selections.restore", | |
"dance.selections.changeDirection", | |
] | |
}, | |
}, | |
"[": { | |
"text": "[surround]", | |
"command": "dance.run", | |
"args": { | |
"commands": [ | |
"dance.modes.insert.after", | |
{"command": "type", "args": {"text": "]"}}, | |
"dance.modes.set.normal", | |
"dance.selections.save", | |
"dance.modes.insert.before", | |
{"command": "type", "args": {"text": "["}}, | |
"dance.modes.set.normal", | |
"dance.selections.restore", | |
"dance.selections.changeDirection", | |
] | |
}, | |
}, | |
"<": { | |
"text": "<surround>", | |
"command": "dance.run", | |
"args": { | |
"commands": [ | |
"dance.modes.insert.after", | |
{"command": "type", "args": {"text": ">"}}, | |
"dance.modes.set.normal", | |
"dance.selections.save", | |
"dance.modes.insert.before", | |
{"command": "type", "args": {"text": "<"}}, | |
"dance.modes.set.normal", | |
"dance.selections.restore", | |
"dance.selections.changeDirection", | |
] | |
}, | |
}, | |
"\"": { | |
"text": "\"surround\"", | |
"command": "dance.run", | |
"args": { | |
"commands": [ | |
"dance.modes.insert.after", | |
{"command": "type", "args": {"text": "\""}}, | |
"dance.modes.set.normal", | |
"dance.selections.save", | |
"dance.modes.insert.before", | |
{"command": "type", "args": {"text": "\""}}, | |
"dance.modes.set.normal", | |
"dance.selections.restore", | |
"dance.selections.changeDirection", | |
] | |
}, | |
}, | |
"'": { | |
"text": "'surround'", | |
"command": "dance.run", | |
"args": { | |
"commands": [ | |
"dance.modes.insert.after", | |
{"command": "type", "args": {"text": "'"}}, | |
"dance.modes.set.normal", | |
"dance.selections.save", | |
"dance.modes.insert.before", | |
{"command": "type", "args": {"text": "'"}}, | |
"dance.modes.set.normal", | |
"dance.selections.restore", | |
"dance.selections.changeDirection", | |
] | |
}, | |
}, | |
"`": { | |
"text": "`surround`", | |
"command": "dance.run", | |
"args": { | |
"commands": [ | |
"dance.modes.insert.after", | |
{"command": "type", "args": {"text": "`"}}, | |
"dance.modes.set.normal", | |
"dance.selections.save", | |
"dance.modes.insert.before", | |
{"command": "type", "args": {"text": "`"}}, | |
"dance.modes.set.normal", | |
"dance.selections.restore", | |
"dance.selections.changeDirection", | |
] | |
}, | |
}, | |
"d": { | |
"text": "delete surround", | |
"command": "dance.run", | |
"args": { | |
"commands": [ | |
"dance.selections.save", | |
"dance.selections.reduce.edges", | |
"dance.edit.delete", | |
"dance.selections.restore", | |
] | |
}, | |
}, | |
} | |
} | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment