Mac で設定しているショートカット
JSON を表示
~/Library/Application Support/Code/User/keybindings.json
[
// ターミナル設定
// プロファイルを使用した新しいターミナルの作成 → ctrl + shift + @
{
"key": "ctrl+shift+[BracketLeft]",
"command": "workbench.action.terminal.newWithProfile"
},
// ターミナルで改行
{
"key": "shift+enter",
"command": "workbench.action.terminal.sendSequence",
"args": {
"text": "\u001b\r"
},
"when": "terminalFocus"
},
// Command + Shift + ↑ で前のターミナルへ
{
"key": "cmd+shift+up",
"command": "workbench.action.terminal.focusPrevious",
"when": "terminalFocus"
},
// Command + Shift + ↓ で前のターミナルへ
{
"key": "cmd+shift+down",
"command": "workbench.action.terminal.focusNext",
"when": "terminalFocus"
},
// エクスプローラ設定
// F2でファイル名称変更
{
"key": "f2",
"command": "renameFile",
"when": "explorerViewletVisible && filesExplorerFocus && !inputFocus"
},
// Enterでファイルを開く(デフォルトでは Enter で名称変更のため)
{
"key": "enter",
"command": "list.select",
"when": "explorerViewletVisible && filesExplorerFocus && !inputFocus"
},
// ファイルの作成
{
"key": "cmd+n",
"command": "explorer.newFile",
"when": "explorerViewletVisible && filesExplorerFocus"
},
// ディレクトリの作成
{
"key": "cmd+shift+n",
"command": "explorer.newFolder",
"when": "explorerViewletVisible && filesExplorerFocus"
},
// ウィンドウ設定
// 新しいウィンドウ
{
"key": "shift+cmd+alt+n",
"command": "workbench.action.newWindow"
// "when": "!editorTextFocus"
}
]
参考記事を貯めます
- 言語ごとにフォーマッタを変えたい