feature request: support for pasting deleted file that still exist in a register.
Did you check existing requests?
- [x] I have searched the existing issues
Describe the feature
Often the following occurs when I work with oil, as can be seen in the video:
https://github.com/stevearc/oil.nvim/assets/62509788/ceecbebf-4eae-4635-a77e-1c875bcba221
The follow happend:
- Run nvim with a minimal config.
- I delete a file called
foo.txtto a register. - I create a directory
foo. - I try to paste the
foo.txtinto the new directory. - This fails, as
foo.txtdoes not exist anymore.
This happens often to me. So I can either try to avoid this pattern, or support for pasting files that are deleted to a register could be added.
Provide background
No response
What is the significance of this feature?
strongly desired
Additional details
No response
I've thought about this feature, and it would be really cool (allowing for seamless undo/redo in oil), but is incredibly difficult to do correctly. I haven't had the time to invest in this, and realistically probably won't.
For your particular use case, what may help is knowing that you can enter a directory before it is created. For example, you are doing:
- delete file
- create directory
- save
- enter directory
- paste
- save (error)
Instead you can do
- delete file
- create directory
- enter directory
- paste
- save
Thanks for your reply. I can imagine it is not easy to implement.
I thought maybe files that still exist in one of the registries will not be removed, instead they are written to some kind of trash folder. From here, oil can retrieve them once the user tries to paste+save a delete file from the registry.
Most likely there are some caveats that I am missing here.