vscode-yaml-plus-json icon indicating copy to clipboard operation
vscode-yaml-plus-json copied to clipboard

Add an option to overwrite existing file

Open qyurila opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe.

Currently, if there is an existing file which has the same name as target filename, the conversion fails and this notification showed up:

file already exist: file:///c%3A/foo/bar.yaml

Despite this behavior is way better than overwriting silently, the extension does not give any option to overwrite existing file, which may be a preferable choice to manually deleting it sometimes.

Describe the solution you'd like

I'd be happy if the 'file already exist' notification comes with a few of option buttons. It might be like:

file already exist: file:///c%3A/foo/bar.yaml
Do you want to overwrite it?
[Yes] [No] [Always]

...and maybe selecting Always option would make a new config line to /.vscode/settings.json for it.

Describe alternatives you've considered

Additional context

qyurila avatar Jun 20 '22 18:06 qyurila

Hi @qyurila

Thank you for opening this issue. Sounds reasonable 🙂 Will have a look at it when I can and keep you updated.

hilleer avatar Jun 21 '22 05:06 hilleer

Hi @qyurila

I'm sorry it took this long to (finally) making this happen.

I have released version 1.12.0 with this new feature, enabled via configuration (as proposed here 🤝) - see README for details.

Please reach out if you have any issues with the new feature or have other new ideas 💡

hilleer avatar Apr 07 '23 09:04 hilleer