Add a custom key binding to invoke a certain shell command in Visual Studio’s integrated terminal.
Implement natively
Clear the terminal’s draft, paste a shell command and invoke it. Requires at least one integrated terminal to exist.
⟨keys⟩
: key to trigger the keybinding likectrl+alt+r
⟨shell command⟩
: command to execute likegit commit --amend
\u0001
sends Start of Heading character to delete what is already draft in the terminal but not yet executed\u000D
sends Carriage Return character to execute the inserted command.
Implement using an extension
Add a custom key binding to invoke a certain shell command. Requires the extension Terminal Command Keys
⟨keys⟩
: key to trigger the keybinding likectrl+alt+r
⟨shell command⟩
: command to execute likegit commit --amend
Sources:
Related:
Tags:
Visual Studio Code
Improve workflow in applications
Terminal Command Keys