Skip to content

Instantly share code, notes, and snippets.

@ShinyChang
Last active January 9, 2022 14:11
Show Gist options
  • Save ShinyChang/1b6e972fb36989922df7a616943760c1 to your computer and use it in GitHub Desktop.
Save ShinyChang/1b6e972fb36989922df7a616943760c1 to your computer and use it in GitHub Desktop.
Codesandbox sublime keymap
  1. Create new sandbox on codesandbox
  2. Press Cmd+Shift+P and choose >Preferences: Open Keyboard Shortcuts (JSON)
  3. Paste the text of keybindings.json in the opened tab (keybindings.json)

The key bindings will store in the user preference, which means you don't need set it again in the future.

Keymap source: https://github.com/Microsoft/vscode-sublime-keybindings

[
{
"key": "cmd+y",
"command": "redo",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+shift+cmd+f",
"command": "workbench.action.toggleZenMode"
},
{
"key": "cmd+w",
"command": "workbench.action.closeActiveEditor"
},
{
"key": "shift+cmd+[",
"command": "workbench.action.previousEditor"
},
{
"key": "shift+cmd+]",
"command": "workbench.action.nextEditor"
},
{
"key": "alt+cmd+s",
"command": "workbench.action.files.saveAll"
},
{
"key": "cmd+k cmd+b",
"command": "workbench.action.toggleSidebarVisibility"
},
{
"key": "ctrl+alt+up",
"command": "scrollLineUp",
"when": "editorTextFocus"
},
{
"key": "ctrl+alt+down",
"command": "scrollLineDown",
"when": "editorTextFocus"
},
{
"key": "cmd+t",
"command": "workbench.action.quickOpen"
},
{
"key": "cmd+r",
"command": "workbench.action.gotoSymbol"
},
{
"key": "cmd+r",
"command": "workbench.action.gotoSymbol"
},
{
"key": "f12",
"command": "editor.action.goToDeclaration"
},
{
"key": "ctrl+-",
"command": "workbench.action.navigateBack"
},
{
"key": "ctrl+shift+-",
"command": "workbench.action.navigateForward"
},
{
"key": "cmd+g",
"command": "editor.action.nextMatchFindAction",
"when": "editorTextFocus"
},
{
"key": "f4",
"command": "editor.action.nextMatchFindAction",
"when": "editorTextFocus"
},
{
"key": "shift+f4",
"command": "editor.action.previousMatchFindAction",
"when": "editorTextFocus"
},
{
"key": "ctrl+cmd+up",
"command": "editor.action.moveLinesUpAction",
"when": "editorTextFocus"
},
{
"key": "ctrl+cmd+down",
"command": "editor.action.moveLinesDownAction",
"when": "editorTextFocus"
},
{
"key": "cmd+/",
"command": "editor.action.commentLine",
"when": "editorTextFocus"
},
{
"key": "cmd+k cmd+up",
"command": "workbench.action.splitEditor"
},
{
"key": "alt+cmd+1",
"command": "workbench.action.joinTwoGroups"
},
{
"key": "alt+cmd+2",
"command": "workbench.action.splitEditor"
},
{
"key": "alt+cmd+8",
"command": "workbench.action.toggleEditorGroupLayout"
},
{
"key": "cmd+k cmd+down",
"command": "workbench.action.closeActiveEditor"
},
{
"key": "alt+cmd+[",
"command": "editor.fold",
"when": "editorFocus"
},
{
"key": "cmd+alt+]",
"command": "editor.unfold",
"when": "editorFocus"
},
{
"key": "cmd+k cmd+0",
"command": "editor.unfoldAll",
"when": "editorFocus"
},
{
"key": "alt+f12",
"command": "editor.action.showContextMenu",
"when": "editorTextFocus"
},
{
"key": "cmd+shift+d",
"command": "editor.action.copyLinesDownAction",
"when": "editorFocus"
},
{
"key": "cmd+l",
"command": "expandLineSelection",
"when": "editorFocus"
},
{
"key": "cmd+d",
"command": "editor.action.addSelectionToNextFindMatch",
"when": "editorFocus"
},
{
"key": "ctrl+m",
"command": "editor.action.jumpToBracket",
"when": "editorFocus"
},
{
"key": "cmd+alt+/",
"command": "editor.action.blockComment",
"when": "editorFocus"
},
{
"key": "cmd+alt+f",
"command": "editor.action.startFindReplaceAction"
},
{
"key": "ctrl+shift+k",
"command": "editor.action.deleteLines",
"when": "editorFocus"
},
{
"key": "ctrl+shift+up",
"command": "editor.action.insertCursorAbove",
"when": "editorTextFocus"
},
{
"key": "ctrl+shift+down",
"command": "editor.action.insertCursorBelow",
"when": "editorTextFocus"
},
{
"key": "ctrl+shift+pageup",
"command": "cursorColumnSelectPageUp",
"when": "editorTextFocus"
},
{
"key": "ctrl+shift+pagedown",
"command": "cursorColumnSelectPageDown",
"when": "editorTextFocus"
},
{
"key": "cmd+shift+l",
"command": "editor.action.insertCursorAtEndOfEachLineSelected",
"when": "editorTextFocus"
},
{
"key": "cmd+1",
"command": "workbench.action.openEditorAtIndex1"
},
{
"key": "cmd+2",
"command": "workbench.action.openEditorAtIndex2"
},
{
"key": "cmd+3",
"command": "workbench.action.openEditorAtIndex3"
},
{
"key": "cmd+4",
"command": "workbench.action.openEditorAtIndex4"
},
{
"key": "cmd+5",
"command": "workbench.action.openEditorAtIndex5"
},
{
"key": "cmd+6",
"command": "workbench.action.openEditorAtIndex6"
},
{
"key": "cmd+7",
"command": "workbench.action.openEditorAtIndex7"
},
{
"key": "cmd+8",
"command": "workbench.action.openEditorAtIndex8"
},
{
"key": "cmd+9",
"command": "workbench.action.openEditorAtIndex9"
},
{
"key": "cmd+ctrl+g",
"command": "editor.action.selectHighlights",
"when": "editorFocus"
},
{
"key": "cmd+shift+r",
"command": "workbench.action.showAllSymbols"
},
{
"key": "ctrl+alt+left",
"command": "cursorWordStartLeft",
"when": "editorTextFocus"
},
{
"key": "ctrl+alt+right",
"command": "cursorWordEndRight",
"when": "editorTextFocus"
},
{
"key": "ctrl+alt+shift+left",
"command": "cursorWordStartLeftSelect",
"when": "editorTextFocus"
},
{
"key": "ctrl+alt+shift+right",
"command": "cursorWordEndRightSelect",
"when": "editorTextFocus"
},
{
"key": "cmd+j",
"command": "editor.action.joinLines",
"when": "editorTextFocus"
},
{
"key": "cmd+k cmd+u",
"command": "editor.action.transformToUppercase",
"when": "editorTextFocus"
},
{
"key": "cmd+k cmd+l",
"command": "editor.action.transformToLowercase",
"when": "editorTextFocus"
},
{
"key": "cmd+k a",
"command": "workbench.action.showErrorsWarnings"
},
{
"key": "cmd+k n",
"command": "editor.action.marker.next",
"when": "editorFocus"
},
{
"key": "cmd+k p",
"command": "editor.action.marker.prev",
"when": "editorFocus"
},
{
"key": "ctrl+1",
"command": "workbench.action.focusFirstEditorGroup",
"when": "editorFocus"
},
{
"key": "ctrl+2",
"command": "workbench.action.focusSecondEditorGroup",
"when": "editorFocus"
},
{
"key": "ctrl+3",
"command": "workbench.action.focusThirdEditorGroup",
"when": "editorFocus"
},
{
"key": "cmd+p",
"command": "workbench.action.quickOpenPreviousEditor"
},
{
"key": "cmd+k cmd+k",
"command": "deleteAllRight",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "cmd+shift+space",
"command": "editor.action.smartSelect.grow",
"when": "editorTextFocus"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment