-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Close buffer and delete underlying file #4592
Comments
I'm not sure I like the idea of being able to really easily rm a file from Helix (and closing the buffer means that there's no way to recover it using Helix), especially since it would be a command that could potentially be accidentally autocompleted; if we were to add this, I'd want it to utilize the system's "trash" mechanism, rather than rm-ing the file. |
I strongly agree that this implementation should be aware of system specific trash mechanism. Any ideas around that, does linux have a general trash mechanism or is it distro specific? I know for Windows and MacOs there are unified trash directories. I will try to research this for linux. |
Looks like the answer was quiet simple to find there exists a The FreeDesktop.org Trash specification which stated by https://github.com/Byron/trash-rs/blob/fcf6bb5eded49de4fedb40513c949f11c6da0b12/src/freedesktop.rs#L1-L7 is implemented by all common distros and DE. I'm not aware about the dependency guidelines for this repo. Would it be okay to add the dependency on something like Byron/trash-rs (https://crates.io/crates/trash) or should this be implemented within the project itself? |
That would be a feasible solution for me, too. I can unterstand the desire to keep file-management out from the editor. Command substitutions would be really nice. Maybe it's worth contributing to #3134.Feel free to close this issue as not relevant within the core. I think #4393 should be getting the same information about command substitutions being a better option instead ab baking in file-management as it's quiet similar to this issue. |
I would like to have an option to delete files from within helix itself. AFAIK there is only the option to use the shell command to rm a file.
Lets assume I've a file called
hello.world
and I want to delete it. I imagine something like the following to delete the current open file and close the buffer.:delete
Would this something be considered worth adding into helix?
The text was updated successfully, but these errors were encountered: