nils-soderman / vscode-batch-runner

Visual Studio Code extension to run batch files in the terminal
https://marketplace.visualstudio.com/items?itemName=NilsSoderman.batch-runner
MIT License
5 stars 5 forks source link

Save before run #14

Closed brokeDude2901 closed 7 months ago

brokeDude2901 commented 10 months ago

Ability to save before run bat file

nils-soderman commented 10 months ago

I like the idea, will look into adding it for the next update!

nils-soderman commented 9 months ago

With the 1.2.0 release you can now set the setting

{
    "batch-runner.saveFileBeforeRun": true
}

to automatically save the batch files before running them.

Full changelog here: https://github.com/nils-soderman/vscode-batch-runner/releases/tag/1.2.0

lucasc190 commented 7 months ago

Is there a reason you didn't make this the default? As far as I know, that's the behaviour in the vast majority of code editors. I can't personally think of any reason why someone would want an easy way to run the current file without making sure it's saved first. I also just think it's more intuitive for an easy command to run the file the user is looking at to run the version of it they're looking at (including any unsaved changes) (i.e. save it first).

nils-soderman commented 7 months ago

Hi,

No, no real reason, chose to default it to false just because that was the current behavior of the extension. But you raise some valid points, and I agree that we should default this to true instead.

nils-soderman commented 7 months ago

With the latest release (1.3.0) batch-runner.saveFileBeforeRun now defaults to true. Thanks for the suggestion!