Whenever I copy-paste a file in VS Code's project pane from one folder to another with an existing file of the same name, it keeps appending a .1
in the filename.
(ex: bob.jpg
-> bob.1.jpg
).
Is there a way to disable this and have it overwrite the file instead (or at least prompt to confirm the overwrite)?
Example of project folder:
[folder] images_1
bob.jpg //copy this
[folder] images_2
bob.jpg //to replace this one here...
For now, I'm forced to do it through Windows Explorer, but if there's a way I'd sure like the answer! :)
You can find and replace text in the Visual Studio editor by using Find and Replace (Ctrl+F or Ctrl+H) or Find/Replace in Files (Ctrl+Shift+F or Ctrl+Shift+H). You can also find and replace only some instances of a pattern by using multi-caret selection.
Instead of paste the code with the key combination Ctrl+V, paste them using Ctrl+Shift+V. A dropdown appears close to the cursor with the list of your clipboard history from Visual Studio. Now you can click directly to an item or you can use the number of the line that you want to paste. That's all!
It's a bit of a hack but I delete the file I'd like to replace, then paste the new one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With