Skip to content

Instantly share code, notes, and snippets.

@BosEriko
Last active July 30, 2018 11:50
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 BosEriko/543bfc801ba864d8cc329b045ce5bc3b to your computer and use it in GitHub Desktop.
Save BosEriko/543bfc801ba864d8cc329b045ce5bc3b to your computer and use it in GitHub Desktop.
Visual Studio Code Custom Hotkeys (Mac)

Visual Studio Code Custom Hotkeys (Mac)

General Commands

Command Name Combination
Show all Commands cmd + (g ~ a)
Open a Project cmd + (g ~ o)
Add Folder to Workspace cmd + (g ~ w)
Remove Folder from Workspace cmd + (g ~ d)
Format Document cmd + (g ~ f)
Change Language Mode cmd + (g ~ m)
Previous in Quick Open cmd + shift + k
Next in Quick Open cmd + shift + j

Search Commands

Command Name Combination
Fuzzy Search cmd + (s ~ s)
Inside Project cmd + (s ~ p)
Inside Project and Replace cmd + (s ~ shift + p)
Inside File cmd + (s ~ i)
Inside File and Replace cmd + (s ~ shift + i)
Inside Folder cmd + (s ~ o)
Inside Folder and Replace cmd + (s ~ shift + o)
Previous Search Result cmd + (s ~ k)
Next Search Result cmd + (s ~ j)

Explorer Commands

Command Name Combination
Open Explorer cmd + (x ~ x)
New File cmd + (x ~ n)
New Folder cmd + (x ~ f)
Reveal in Finder cmd + (x ~ e)
Open in Integrated Terminal cmd + (x ~ i)
Open to the Side cmd + (x ~ s)
Copy Path cmd + (x ~ h)
Copy File cmd + (x ~ c)
Paste File cmd + (x ~ v)
Delete File cmd + (x ~ d)
Rename File cmd + (x ~ r)

Toggle Commands

Command Name Combination
Everything (?) cmd + (t ~ t)
Zen Mode cmd + (t ~ z)
Bottom Panel cmd + (t ~ b)
Bottom Status Bar cmd + (t ~ s)
Sidebar cmd + (t ~ i)
Activity Bar cmd + (t ~ a)
Editor Tabs cmd + (t ~ e)
Minimap cmd + (t ~ m)
Word Wrap cmd + (t ~ w)

Integrated Terminal Commands

Command Name Combination
Focus on Integrated Terminal cmd + (i ~ i)
Previous Terminal cmd + (i ~ j)
Next Terminal cmd + (i ~ k)
Kill Current Terminal cmd + (i ~ d)
Split Pane cmd + (i ~ s)
Move to left Pane cmd + (i ~ h)
Move to right Pane cmd + (i ~ l)
Close Active Pane cmd + (i ~ x)
Create New Terminal cmd + (i ~ n)
Maximize Bottom Panel cmd + (i ~ m)
Clear the Terminal cmd + (i ~ c)

Editor Commands

Command Name Combination
Focus on the Editor cmd + (e ~ e)
Previous Window cmd + (e ~ j)
Next Window cmd + (e ~ k)
Move Window to the left (Tab List) cmd + (e ~ [)
Move Window to the Right (Tab List) cmd + (e ~ ])
Close Current Window cmd + (e ~ d)
Split Window cmd + (e ~ s)
Toggle Split Vertically/Horizontally cmd + (e ~ v)
Switch Split Window cmd + (e ~ l)
Close Active Split Window cmd + (e ~ x)
Comment Highlighted Line cmd + (e ~ c)
Save Changes cmd + (e ~ enter)
Open Preview to the Side (Markdown) cmd + (e ~ m)

Commands with ~ are chord commands


Extensions that matter

Extension Name Creator
Vim vscodevim
multi-command ryuta46
Bracket Pair Colorizer CoenraadS
Hopscotch (Official) idleberg
TODO Highlight Wayou Liu

Remember to install Font Ligatures as well


Reference

// Place your key bindings in this file to overwrite the defaults
[
// General Commands
{
"key": "cmd+g",
"command": "-editor.action.nextMatchFindAction",
"when": "editorFocus"
},
{
"key": "shift+cmd+g",
"command": "-editor.action.previousMatchFindAction",
"when": "editorFocus"
},
{
"key": "cmd+g cmd+a",
"command": "workbench.action.showCommands"
},
{
"key": "shift+cmd+p",
"command": "-workbench.action.showCommands"
},
{
"key": "cmd+g cmd+o",
"command": "workbench.action.files.openFileFolder"
},
{
"key": "cmd+o",
"command": "-workbench.action.files.openFileFolder"
},
{
"key": "cmd+g cmd+w",
"command": "workbench.action.addRootFolder"
},
{
"key": "shift+cmd+j",
"command": "workbench.action.quickOpenSelectNext",
"when": "inQuickOpen"
},
{
"key": "ctrl+n",
"command": "-workbench.action.quickOpenSelectNext",
"when": "inQuickOpen"
},
{
"key": "shift+cmd+j",
"command": "-workbench.action.search.toggleQueryDetails",
"when": "searchViewletVisible"
},
{
"key": "shift+cmd+k",
"command": "workbench.action.quickOpenSelectPrevious",
"when": "inQuickOpen"
},
{
"key": "ctrl+p",
"command": "-workbench.action.quickOpenSelectPrevious",
"when": "inQuickOpen"
},
{
"key": "shift+cmd+k",
"command": "-editor.action.deleteLines",
"when": "textInputFocus && !editorReadonly"
},
{
"key": "cmd+g cmd+f",
"command": "editor.action.formatDocument",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "shift+alt+f",
"command": "-editor.action.formatDocument",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "cmd+g cmd+m",
"command": "workbench.action.editor.changeLanguageMode"
},
{
"key": "cmd+k m",
"command": "-workbench.action.editor.changeLanguageMode"
},
{
"key": "cmd+g cmd+d",
"command": "workbench.action.removeRootFolder"
},
// Search Commands
{
"key": "cmd+s cmd+s",
"command": "workbench.action.quickOpen"
},
{
"key": "cmd+p",
"command": "-workbench.action.quickOpen"
},
{
"key": "cmd+s cmd+p",
"command": "workbench.action.findInFiles",
"when": "!searchInputBoxFocus"
},
{
"key": "shift+cmd+f",
"command": "-workbench.action.findInFiles",
"when": "!searchInputBoxFocus"
},
{
"key": "cmd+s shift+cmd+p",
"command": "workbench.action.replaceInFiles"
},
{
"key": "shift+cmd+h",
"command": "-workbench.action.replaceInFiles"
},
{
"key": "cmd+s cmd+i",
"command": "actions.find"
},
{
"key": "cmd+f",
"command": "-actions.find"
},
{
"key": "cmd+s shift+cmd+i",
"command": "editor.action.startFindReplaceAction"
},
{
"key": "alt+cmd+f",
"command": "-editor.action.startFindReplaceAction"
},
{
"key": "cmd+s cmd+o",
"command": "filesExplorer.findInFolder"
},
{
"key": "cmd+s shift+cmd+o",
"command": "workbench.action.replaceInFiles"
},
{
"key": "cmd+s cmd+j",
"command": "search.action.focusNextSearchResult",
"when": "hasSearchResult"
},
{
"key": "f4",
"command": "-search.action.focusNextSearchResult",
"when": "hasSearchResult"
},
{
"key": "cmd+s cmd+k",
"command": "search.action.focusPreviousSearchResult",
"when": "hasSearchResult"
},
{
"key": "shift+f4",
"command": "-search.action.focusPreviousSearchResult",
"when": "hasSearchResult"
},
// Explorer Commands
{
"key": "cmd+x",
"command": "-editor.action.clipboardCutAction",
"when": "textInputFocus && !editorReadonly"
},
{
"key": "cmd+x cmd+x",
"command": "workbench.view.explorer"
},
{
"key": "shift+cmd+e",
"command": "-workbench.view.explorer"
},
{
"key": "cmd+x cmd+n",
"command": "explorer.newFile"
},
{
"key": "cmd+x cmd+f",
"command": "explorer.newFolder"
},
{
"key": "cmd+x cmd+e",
"command": "revealFileInOS",
"when": "!editorFocus"
},
{
"key": "alt+cmd+r",
"command": "-revealFileInOS",
"when": "!editorFocus"
},
{
"key": "cmd+x cmd+i",
"command": "openInTerminal"
},
{
"key": "cmd+x cmd+s",
"command": "explorer.openToSide",
"when": "explorerViewletFocus && explorerViewletVisible && !inputFocus"
},
{
"key": "ctrl+enter",
"command": "-explorer.openToSide",
"when": "explorerViewletFocus && explorerViewletVisible && !inputFocus"
},
{
"key": "cmd+x cmd+h",
"command": "copyFilePath",
"when": "!editorFocus"
},
{
"key": "alt+cmd+c",
"command": "-copyFilePath",
"when": "!editorFocus"
},
{
"key": "cmd+x cmd+c",
"command": "filesExplorer.copy",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !inputFocus"
},
{
"key": "cmd+c",
"command": "-filesExplorer.copy",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !inputFocus"
},
{
"key": "cmd+x cmd+v",
"command": "filesExplorer.paste",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus"
},
{
"key": "cmd+v",
"command": "-filesExplorer.paste",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus"
},
{
"key": "cmd+x cmd+d",
"command": "moveFileToTrash",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
},
{
"key": "cmd+backspace",
"command": "-moveFileToTrash",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
},
{
"key": "cmd+x cmd+r",
"command": "renameFile",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
},
{
"key": "enter",
"command": "-renameFile",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
},
// Toggle Commands
{
"key": "cmd+t",
"command": "-workbench.action.showAllSymbols"
},
{
"key": "cmd+t cmd+t",
"command": "multiCommand.makeRoom"
},
{
"key": "cmd+t cmd+z",
"command": "workbench.action.toggleZenMode"
},
{
"key": "cmd+k z",
"command": "-workbench.action.toggleZenMode"
},
{
"key": "cmd+t cmd+b",
"command": "workbench.action.togglePanel"
},
{
"key": "cmd+j",
"command": "-workbench.action.togglePanel"
},
{
"key": "cmd+t cmd+s",
"command": "workbench.action.toggleStatusbarVisibility"
},
{
"key": "cmd+t cmd+i",
"command": "workbench.action.toggleSidebarVisibility"
},
{
"key": "cmd+b",
"command": "-workbench.action.toggleSidebarVisibility"
},
{
"key": "cmd+t cmd+a",
"command": "workbench.action.toggleActivityBarVisibility"
},
{
"key": "cmd+t cmd+e",
"command": "workbench.action.toggleTabsVisibility"
},
{
"key": "ctrl+cmd+w",
"command": "-workbench.action.toggleTabsVisibility"
},
{
"key": "cmd+t cmd+m",
"command": "editor.action.toggleMinimap"
},
{
"key": "cmd+t cmd+w",
"command": "editor.action.toggleWordWrap"
},
{
"key": "alt+z",
"command": "-editor.action.toggleWordWrap"
},
// Integrated Terminal Commands
{
"key": "cmd+i",
"command": "-expandLineSelection",
"when": "textInputFocus"
},
{
"key": "cmd+i cmd+i",
"command": "workbench.action.terminal.focus"
},
{
"key": "cmd+i cmd+j",
"command": "workbench.action.terminal.focusPrevious"
},
{
"key": "cmd+i cmd+k",
"command": "workbench.action.terminal.focusNext"
},
{
"key": "cmd+i cmd+d",
"command": "workbench.action.terminal.kill"
},
{
"key": "cmd+i cmd+s",
"command": "workbench.action.terminal.split",
"when": "terminalFocus"
},
{
"key": "cmd+\\",
"command": "-workbench.action.terminal.split",
"when": "terminalFocus"
},
{
"key": "cmd+i cmd+h",
"command": "workbench.action.terminal.focusPreviousPane",
"when": "terminalFocus"
},
{
"key": "alt+cmd+left",
"command": "-workbench.action.terminal.focusPreviousPane",
"when": "terminalFocus"
},
{
"key": "cmd+i cmd+l",
"command": "workbench.action.terminal.focusNextPane",
"when": "terminalFocus"
},
{
"key": "alt+cmd+right",
"command": "-workbench.action.terminal.focusNextPane",
"when": "terminalFocus"
},
{
"key": "cmd+i cmd+x",
"command": "workbench.action.terminal.kill"
},
{
"key": "cmd+i cmd+n",
"command": "workbench.action.terminal.new"
},
{
"key": "ctrl+shift+`",
"command": "-workbench.action.terminal.new"
},
{
"key": "cmd+i cmd+m",
"command": "workbench.action.toggleMaximizedPanel"
},
{
"key": "cmd+i cmd+c",
"command": "workbench.action.terminal.clear",
"when": "terminalFocus"
},
{
"key": "cmd+k",
"command": "-workbench.action.terminal.clear",
"when": "terminalFocus"
},
// Editor Commands
{
"key": "cmd+e",
"command": "-actions.findWithSelection"
},
{
"key": "cmd+e cmd+e",
"command": "workbench.action.focusActiveEditorGroup"
},
{
"key": "cmd+e cmd+j",
"command": "workbench.action.previousEditor"
},
{
"key": "shift+cmd+[",
"command": "-workbench.action.previousEditor"
},
{
"key": "cmd+e cmd+k",
"command": "workbench.action.nextEditor"
},
{
"key": "shift+cmd+]",
"command": "-workbench.action.nextEditor"
},
{
"key": "cmd+e cmd+d",
"command": "workbench.action.closeActiveEditor"
},
{
"key": "cmd+w",
"command": "-workbench.action.closeActiveEditor"
},
{
"key": "cmd+e cmd+s",
"command": "workbench.action.splitEditor"
},
{
"key": "cmd+\\",
"command": "-workbench.action.splitEditor"
},
{
"key": "cmd+e cmd+v",
"command": "workbench.action.toggleEditorGroupLayout"
},
{
"key": "alt+cmd+0",
"command": "-workbench.action.toggleEditorGroupLayout"
},
{
"key": "cmd+e cmd+l",
"command": "workbench.action.navigateEditorGroups"
},
{
"key": "cmd+e cmd+x",
"command": "workbench.action.closeEditorsInGroup"
},
{
"key": "cmd+k w",
"command": "-workbench.action.closeEditorsInGroup"
},
{
"key": "cmd+e cmd+c",
"command": "editor.action.commentLine",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "cmd+/",
"command": "-editor.action.commentLine",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "cmd+e cmd+enter",
"command": "workbench.action.files.save"
},
{
"key": "cmd+s",
"command": "-workbench.action.files.save"
},
{
"key": "cmd+e cmd+m",
"command": "markdown.showPreviewToSide",
"when": "editorLangId == 'markdown'"
},
{
"key": "cmd+k v",
"command": "-markdown.showPreviewToSide",
"when": "editorLangId == 'markdown'"
},
{
"key": "cmd+e cmd+[",
"command": "workbench.action.moveEditorLeftInGroup"
},
{
"key": "cmd+k shift+cmd+left",
"command": "-workbench.action.moveEditorLeftInGroup"
},
{
"key": "cmd+e cmd+]",
"command": "workbench.action.moveEditorRightInGroup"
},
{
"key": "cmd+k shift+cmd+right",
"command": "-workbench.action.moveEditorRightInGroup"
},
// Other Commands
{}
]
{
"workbench.colorTheme": "Hopscotch",
"editor.minimap.enabled": false,
"editor.lineNumbers": "relative",
"workbench.editor.showTabs": true,
"window.zoomLevel": 0,
"workbench.activityBar.visible": false,
"workbench.statusBar.visible": true,
"explorer.openEditors.visible": 0,
"workbench.sideBar.location": "right",
"workbench.editor.enablePreview": false,
"multiCommand.commands": [
{
"command": "multiCommand.makeRoom",
"sequence": [
"workbench.action.togglePanel",
"workbench.action.toggleStatusbarVisibility",
"workbench.action.toggleSidebarVisibility",
"workbench.action.toggleActivityBarVisibility",
"workbench.action.toggleTabsVisibility",
"editor.action.toggleMinimap"
]
}
],
"vim.useSystemClipboard": true,
"files.autoSave": "off",
"editor.fontFamily": "Fira Code",
"editor.fontLigatures": true,
"editor.fontSize": 13,
"editor.tabSize": 4,
"editor.insertSpaces": true,
"editor.renderWhitespace": "all"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment