Skip to content

Instantly share code, notes, and snippets.

@danthemango
Last active August 28, 2024 19:17
Show Gist options
  • Save danthemango/ee819f3a5316428435559749706c8176 to your computer and use it in GitHub Desktop.
Save danthemango/ee819f3a5316428435559749706c8176 to your computer and use it in GitHub Desktop.
Some keybindings I use, some for vsvim and copilot
// this adds a command to re-run the previous bash command
// asuming you git-bash or another bash terminal open inside of vscode
// update the keybindings json array as follows
[
// run `!!` in terminal (repeats last bash command)
{
"key": "shift+enter",
"command": "workbench.action.terminal.sendSequence",
"args": {
"text": "!!\r"
}
},
// enable copilot prompt in vsvim
{
"key": "ctrl+i",
"command": "-extension.vim_ctrl+i",
"when": "editorTextFocus && vim.active && vim.use<C-i> && !inDebugRepl"
},
// toggle bottom panel when not in vsvim insert mode
{
"key": "ctrl+j",
"command": "workbench.action.togglePanel",
"when": "!inDebugMode && vim.mode != 'Insert'"
},
// toggle left panel when not in vsvim insert mode
{
"key": "ctrl+b",
"command": "workbench.action.toggleSidebarVisibility",
"when": "!inDebugMode && vim.mode != 'Insert'"
},
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment