The Problem
An operation I do a lot is to highlight/select code on the editors and then paste it on the integrated terminal to execute it. While I got pretty fast at using Ctrl + c
, Ctrl + backtick
, Ctrl + Shift + v
and Enter
, it's very annoying and repetitive. Is there a way to configure a macro or shortcut for this?
A Solution (failed) Attempt
This Github thread and this StackOverflow Question show how to create a shortcut to toggle between different Integrated Terminals. I would like for something similar to happen in my case (I used Ctrl + Shift + u
in the example below), e.g.:
[
{
"key" : "ctrl+shift+k",
"command" : "workbench.action.terminal.focusNext"
},
{
"key" : "ctrl+shift+j",
"command" : "workbench.action.terminal.focusPrevious"
},
{
"key" : "ctrl+shift+u",
"command" : "ctrl+c+ctrl+`+ctrl+shift+v+enter"
},
]