Vscode-code-runner: Can I use Code Runner to "run on save"?

Created on 14 Oct 2018  ·  3Comments  ·  Source: formulahendry/vscode-code-runner

need more info

Most helpful comment

@formulahendry I think what the author meant is to run the code every time you save the file. Is this possible?

All 3 comments

We have two settings:

  • "code-runner.saveAllFilesBeforeRun": save all files before running
  • "code-runner.saveFileBeforeRun": save the current file before running

Is is enough for your?

@formulahendry I think what the author meant is to run the code every time you save the file. Is this possible?

As above, I was looking for a solution to this as well; a way to run Code Runner automatically upon saving a file (in contrast to the current implementation of saving file(s) before running Code Runner). This would also bring it closer to Quokka.js which actively updates the output upon saving the watched file.

At the moment, my workaround is to add the following macro/shortcut to VS Code's keybindings.json to simulate this requested behaviour.

{
  "key": "ctrl+enter",
  "command": "code-runner.run"
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

ElektroStudios picture ElektroStudios  ·  4Comments

bhavinkamani picture bhavinkamani  ·  4Comments

nmchgx picture nmchgx  ·  3Comments

seiferthan picture seiferthan  ·  4Comments

N2ITN picture N2ITN  ·  5Comments