Closed plneple closed 3 months ago
@stevearc I was unaware that this idea has already been implemented, my bad.
There are several potential solutions I was able to come up with:
mv
command, the outcome is exactly the same, with no warnings or additional flags.~~
mv a.txt foo/a.txt
Please let me know if you find any of these acceptable.
EDIT: After reading the linked PR more carefully, I now see that the first option is not acceptable for this plugin.
The ideal would be that if you :w
with these changes, the save operation is blocked, an error is displayed, and a diagnostic is added to the offending line. This is currently how it works for similar behavior (e.g. creating two files with the same name).
Alternatively, there is a subset of this functionality that may be easier to add: allowing these files to be moved into a new directory, but not an existing one. This doesn't produce the same issues with filename collisions, and might be easier to code.
Adds handling for non-existing directories for the MOVE command, similar to how CREATE works