settings.json
// Place your key bindings in this file to override the defaultsauto[]
[
// terminal=================
// 切换到terminal终端
{
"key": "ctrl+,",
"command": "workbench.action.terminal.toggleTerminal",
"when": "terminal.active"
},
// 打开一个新的terminal
{
"key": "ctrl+shift+,",
"command": "workbench.action.terminal.new",
"when": "terminalProcessSupported || terminalWebExtensionContributedProfile"
},
{
"key": "alt+j",
"command": "workbench.action.terminal.focusNext",
"when": "terminalFocus"
},
{
"key": "alt+k",
"command": "workbench.action.terminal.focusPrevious",
"when": "terminalFocus"
},
// 切换到文件浏览器,可以在任何位置
// {
// "key": "ctrl+;",
// "command": "workbench.view.explorer",
// "when": "viewContainer.workbench.view.explorer.enabled"
// },
// 切换到代码编辑区,不论在任何位置
{
"key": "ctrl+'",
"command": "workbench.action.focusFirstEditorGroup"
},
// 在file tree 和editor区域切换
{
"command": "workbench.action.focusFirstEditorGroup",
"key": "ctrl+;",
},
{
"command": "workbench.files.action.focusFilesExplorer",
"key": "ctrl+;",
},
{
"key": "ctrl+shift+j",
"command": "workbench.action.togglePanel"
},
// 在文件夹资源管理器中新建一个文件
{
"key": "a",
"command": "explorer.newFile",
"when": "filesExplorerFocus && !inputFocus"
},
// 在文件资源管理器里面创建一个文件夹
{
"key": "shift+a",
"command": "explorer.newFolder",
"when": "filesExplorerFocus && !inputFocus"
},
// 在文件资源管理器里面重应名当前文件或文件夹
{
"key": "r",
"command": "renameFile",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
},
// 在文件资源管理器中删除文件
{
"key": "d",
"command": "deleteFile",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus"
},
// 放大editor区域
{
"key": "ctrl+m",
"command": "workbench.action.maximizeEditorHideSidebar"
},
// 使用code runner运行代码
{
"key": "ctrl+r",
"command": "code-runner.run"
},
{
"key": "y",
"command": "filesExplorer.copy",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !inputFocus"
},
{
"key": "p",
"command": "filesExplorer.paste",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus"
},
{
"key": "ctrl+s",
"command": "workbench.action.files.save"
},
{
"key": "ctrl+/",
"command": "-workbench.action.terminal.sendSequence",
"when": "terminalFocus"
},
{
"key": "ctrl+/",
"command": "editor.action.commentLine",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "cmd+/",
"command": "-editor.action.commentLine",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+p",
"command": "-extension.vim_ctrl+p",
"when": "editorTextFocus && vim.active && vim.use<C-p> && !inDebugRepl || vim.active && vim.use<C-p> && !inDebugRepl && vim.mode == 'CommandlineInProgress' || vim.active && vim.use<C-p> && !inDebugRepl && vim.mode == 'SearchInProgressMode'"
},
{
"key": "ctrl+h",
"command": "editor.action.startFindReplaceAction",
"when": "editorFocus || editorIsOpen"
}
]
keybingdings.json
// Place your key bindings in this file to override the defaultsauto[]
[
// terminal=================
// 切换到terminal终端
{
"key": "ctrl+,",
"command": "workbench.action.terminal.toggleTerminal",
"when": "terminal.active"
},
// 打开一个新的terminal
{
"key": "ctrl+shift+,",
"command": "workbench.action.terminal.new",
"when": "terminalProcessSupported || terminalWebExtensionContributedProfile"
},
{
"key": "alt+j",
"command": "workbench.action.terminal.focusNext",
"when": "terminalFocus"
},
{
"key": "alt+k",
"command": "workbench.action.terminal.focusPrevious",
"when": "terminalFocus"
},
// 切换到文件浏览器,可以在任何位置
// {
// "key": "ctrl+;",
// "command": "workbench.view.explorer",
// "when": "viewContainer.workbench.view.explorer.enabled"
// },
// 切换到代码编辑区,不论在任何位置
{
"key": "ctrl+'",
"command": "workbench.action.focusFirstEditorGroup"
},
// 在file tree 和editor区域切换
{
"command": "workbench.action.focusFirstEditorGroup",
"key": "ctrl+;",
},
{
"command": "workbench.files.action.focusFilesExplorer",
"key": "ctrl+;",
},
{
"key": "ctrl+shift+j",
"command": "workbench.action.togglePanel"
},
// 在文件夹资源管理器中新建一个文件
{
"key": "a",
"command": "explorer.newFile",
"when": "filesExplorerFocus && !inputFocus"
},
// 在文件资源管理器里面创建一个文件夹
{
"key": "shift+a",
"command": "explorer.newFolder",
"when": "filesExplorerFocus && !inputFocus"
},
// 在文件资源管理器里面重应名当前文件或文件夹
{
"key": "r",
"command": "renameFile",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
},
// 在文件资源管理器中删除文件
{
"key": "d",
"command": "deleteFile",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus"
},
// 放大editor区域
{
"key": "ctrl+m",
"command": "workbench.action.maximizeEditorHideSidebar"
},
// 使用code runner运行代码
{
"key": "ctrl+r",
"command": "code-runner.run"
},
{
"key": "y",
"command": "filesExplorer.copy",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !inputFocus"
},
{
"key": "p",
"command": "filesExplorer.paste",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus"
},
{
"key": "ctrl+s",
"command": "workbench.action.files.save"
},
{
"key": "ctrl+/",
"command": "-workbench.action.terminal.sendSequence",
"when": "terminalFocus"
},
{
"key": "ctrl+/",
"command": "editor.action.commentLine",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "cmd+/",
"command": "-editor.action.commentLine",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+p",
"command": "-extension.vim_ctrl+p",
"when": "editorTextFocus && vim.active && vim.use<C-p> && !inDebugRepl || vim.active && vim.use<C-p> && !inDebugRepl && vim.mode == 'CommandlineInProgress' || vim.active && vim.use<C-p> && !inDebugRepl && vim.mode == 'SearchInProgressMode'"
},
{
"key": "ctrl+h",
"command": "editor.action.startFindReplaceAction",
"when": "editorFocus || editorIsOpen"
}
]