Skip to content

Instantly share code, notes, and snippets.

@jonaprieto
Last active June 14, 2023 22:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonaprieto/c1ed2b15a1c08a1ba5ea3a429253f996 to your computer and use it in GitHub Desktop.
Save jonaprieto/c1ed2b15a1c08a1ba5ea3a429253f996 to your computer and use it in GitHub Desktop.
Dance config for vscode
[
{
"key": "ctrl+g",
"command": "dance.modes.set.normal",
"args" : {
"mode": ""
},
"when": "(editorTextFocus) && (dance.mode == 'normal' || dance.mode == 'insert' || dance.mode == 'insert' || dance.mode == 'window' || dance.mode == 'view' || dance.mode == 'file' || dance.mode == 'project')",
},
// ===========================================================================
// Window
// ===========================================================================
{
"key": "space w",
"command": "dance.modes.set",
"when": "editorTextFocus && dance.mode == 'normal'",
"args": {
"mode": "window"
}
},
{
"key": "Escape",
"command": "dance.modes.set.normal",
"when": "dance.mode == 'window'"
},
{
"key": "0",
"command": "workbench.action.evenEditorWidths",
"when": "editorTextFocus && dance.mode == 'window'"
},
{
"key": "c",
"command": "workbench.action.closeActiveEditor",
"when": "editorTextFocus && dance.mode == 'window'"
},
{
"key": "shift+c",
"command": "workbench.action.closeAllEditors",
"when": "editorTextFocus && dance.mode == 'window'"
},
{
"key": "t",
"command": "workbench.action.createTerminalEditor",
"when": "editorTextFocus && dance.mode == 'window'"
},
{
"key": "u",
"command": "workbench.action.splitEditorUp",
"when": "editorTextFocus && dance.mode == 'window'"
},
{
"key": "d",
"command": "workbench.action.splitEditorDown",
"when": "editorTextFocus && dance.mode == 'window'"
},
{
"key": "r",
"command": "workbench.action.splitEditorRight",
"when": "editorTextFocus && dance.mode == 'window'"
},
{
"key": "l",
"command": "workbench.action.splitEditorLeft",
"when": "editorTextFocus && dance.mode == 'window'"
},
{
"key": "w",
"command": "workbench.action.switchWindow",
"when": "editorTextFocus && dance.mode == 'window'"
},
{
"key": "q",
"command": "workbench.action.closeActiveEditor",
"when": "editorTextFocus && dance.mode == 'window'"
},
{
"key": "c",
"command": "workbench.action.closeWindow",
"when": "editorTextFocus && dance.mode == 'window'"
},
{
"key": "shift+n",
"command": "workbench.action.newWindow",
"when": "dance.mode == 'window'"
},
{
"key": "ctrl+h",
"command": "workbench.action.decreaseViewWidth",
"when": "dance.mode == 'window'"
},
{
"key": "left",
"command": "workbench.action.decreaseViewWidth",
"when": "editorTextFocus && dance.mode == 'window'"
},
{
"key": "ctrl+l",
"command": "workbench.action.increaseViewWidth",
"when": "editorTextFocus && dance.mode == 'window'"
},
{
"key": "right",
"command": "workbench.action.increaseViewWidth",
"when": "editorTextFocus && dance.mode == 'window'"
},
{
"key": "ctrl+j",
"command": "workbench.action.increaseViewHeight",
"when": "editorTextFocus && dance.mode == 'window'"
},
{
"key": "down",
"command": "workbench.action.increaseViewHeight",
"when": "editorTextFocus && dance.mode == 'window'"
},
{
"key": "ctrl+k",
"command": "workbench.action.increaseViewHeight",
"when": "dance.mode == 'window'"
},
{
"key": "up",
"command": "workbench.action.decreaseViewHeight",
"when": "editorTextFocus && dance.mode == 'window'"
},
// ===========================================================================
// Views and similar
// ===========================================================================
{
"key": "space v",
"command": "dance.modes.set.temporarily",
"when": "dance.mode == 'normal'",
"args": {
"mode": "view"
}
},
{
"key": "Escape",
"command": "dance.modes.set.normal",
"when": "dance.mode == 'view'"
},
{
"key": "e",
"command": "workbench.view.explorer",
"when": "editorTextFocus && dance.mode == 'view'"
},
{
"key": "x",
"command": "workbench.view.extensions",
"when": "editorTextFocus && dance.mode == 'view'"
},
{
"key": "d",
"command": "workbench.view.debug",
"when": "editorTextFocus && dance.mode == 'view'"
},
{
"key": "s",
"command": "workbench.view.search",
"when": "editorTextFocus && dance.mode == 'view'"
},
{
"key": "g",
"command": "workbench.view.scm",
"when": "editorTextFocus && dance.mode == 'view'"
},
{
"key": "o",
"command": "workbench.action.output.toggleOutput",
"when": "editorTextFocus && dance.mode == 'view'"
},
{
"key": "j",
"command": "workbench.action.togglePanel",
"when": "editorTextFocus && dance.mode == 'view'"
},
{
"key": "h",
"command": "workbench.action.toggleSidebarVisibility",
"when": "editorTextFocus && dance.mode == 'view'"
},
{
"key": "a",
"command": "workbench.action.toggleActivityBarVisibility",
"when": "editorTextFocus && dance.mode == 'view'"
},
{
"key": "r",
"command": "workbench.action.toggleAuxiliaryBar",
"when": "editorTextFocus && dance.mode == 'view'"
},
{
"key": "t",
"command": "workbench.action.toggleLightDarkThemes",
"when": "editorTextFocus && dance.mode == 'view'"
},
{
"key": "b",
"command": "workbench.action.toggleStatusbarVisibility",
"when": "editorTextFocus && dance.mode == 'view'"
},
{
"key": "z",
"command": "workbench.action.toggleZenMode",
"when": "editorTextFocus && dance.mode == 'view'"
},
{
"key": "cmd+k cmd+n",
"command": "workbench.action.nextEditor",
},
{
"key": "n",
"command": "workbench.action.nextEditor",
"when": "editorTextFocus && dance.mode == 'view'"
},
{
"key": "cmd+k cmd+p",
"command": "workbench.action.previousEditor",
},
{
"key": "p",
"command": "workbench.action.previousEditor",
"when": "editorTextFocus && dance.mode == 'view'"
},
{
"key": "shift+cmd+/",
"command": "editor.action.blockComment",
"when": "editorTextFocus && dance.mode == 'insert'"
},
// ===========================================================================
// files
// ===========================================================================
{
"key": "space f",
"command": "dance.modes.set",
"when": "editorTextFocus && dance.mode == 'normal'",
"args": {
"mode": "file"
}
},
{
"key": "Escape",
"command": "dance.modes.set.normal",
"when": "dance.mode == 'file'"
},
{
"key": "o",
"command": "workbench.action.openWorkspace",
"when": "editorTextFocus && dance.mode == 'file'"
},
{
"key": "o",
"command": "workbench.action.files.save",
"when": "editorTextFocus && dance.mode == 'file'"
},
// ===========================================================================
// Project
// ===========================================================================
{
"key": "space p",
"command": "dance.modes.set",
"when": "editorTextFocus && dance.mode == 'normal'",
"args": {
"mode": "project"
}
},
{
"key": "Escape",
"command": "dance.modes.set.normal",
"when": "dance.mode == 'project'"
},
{
"key": "o",
"command": "workbench.action.files.openFolderViaWorkspace",
"when": "editorTextFocus && dance.mode == 'project'"
},
{
"key": "a",
"command": "workbench.action.addRootFolder",
"when": "editorTextFocus && dance.mode == 'project'"
},
// ===========================================================================
// Additionals to Normal
// ===========================================================================
{
"key": "space b",
"command": "workbench.action.switchWindow",
"when": "editorTextFocus && dance.mode == 'normal'"
},
{
"key": ".",
"command": "editor.action.revealDefinition",
"when": "editorTextFocus && dance.mode == 'normal'"
},
{
"key": "alt+.",
"command": "editor.action.goToReferences",
"when": "editorTextFocus && dance.mode == 'normal'"
},
{
"key": "ctrl+.",
"command": "editor.action.goToTypeDefinition",
"when": "editorTextFocus && dance.mode == 'normal'"
},
{
"key": ",",
"command": "workbench.action.navigateBack",
"when": "editorTextFocus && dance.mode == 'normal'"
},
{
"key": ";",
"command": "editor.action.showHover",
"when": "editorTextFocus && dance.mode == 'normal"
},
{
"key": "Escape",
"command": "dance.modes.set.normal",
"when": "dance.mode == 'insert'"
}
]
"dance.modes": {
"normal": {
"cursorStyle": "block",
"selectionBehavior": "character"
},
"window": {
"cursorStyle": "line"
},
"tab": {
"cursorStyle": "line"
},
"view": {
},
"file": {
},
"project": {
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment