vscode-yaml-plus-json
vscode-yaml-plus-json copied to clipboard
Add an option to overwrite existing file
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
Hi @qyurila
Thank you for opening this issue. Sounds reasonable 🙂 Will have a look at it when I can and keep you updated.
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 💡