I have this handy little keyboard shortcut in my settings.json
for vscode which reloads my repl:
{
"key": "cmd+shift+r",
"command": "workbench.action.terminal.sendSequence",
"args": { "text": ":r\n" }
},
Now I would like this command to run on file save, without having to hit the shortcut. VSCode has an inbuilt setting editor.codeActionsOnSave
, but the above command is not a code action. The extensions I have found are all for running shell commands.
Plus points for solutions which let me conditionally execute the command based on file extensions and whether my terminal is open and running the repl.