# Switch from delete file by default to trash file by default \(\#10875\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/d2569afe662be93c926eed1aeb2b17d050ba90b0)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: d2569afe662be93c926eed1aeb2b17d050ba90b0

Requested commit: d2569afe662be93c926eed1aeb2b17d050ba90b0

Commit: d2569afe662be93c926eed1aeb2b17d050ba90b0

Tree: 87ba0b5e640a8f1e58ba2d47b6d34261cfe074bd

Author: Mikayla Maki

Committer: GitHub

## Message

````
Switch from delete file by default to trash file by default (#10875)

TODO:

- [x] Don't immediately seg fault
- [x] Implement for directories 
- [x] Add cmd-delete to remove files
- [ ] ~~Add setting for trash vs. delete~~ You can just use keybindings
to change the behavior.

fixes https://github.com/zed-industries/zed/issues/7228
fixes https://github.com/zed-industries/zed/issues/5094

Release Notes:

- Added a new `project_panel::Trash` action and changed the default
behavior for `backspace` and `delete` in the project panel to send a
file to the systems trash, instead of permanently deleting it
([#7228](https://github.com/zed-industries/zed/issues/7228),
[#5094](https://github.com/zed-industries/zed/issues/5094)). The
original behavior can be restored by adding the following section to
your keybindings:

```json5
[
// ...Other keybindings...
  {
    "context": "ProjectPanel",
    "bindings": {
        "backspace": "project_panel::Delete",
        "delete": "project_panel::Delete",
    }
  }
]
````

## Parents

- [5dbd23f6b095d182cf320ebfe6248f2fafbac013](https://git.cafe/gitcafe/zed/commit/5dbd23f6b095d182cf320ebfe6248f2fafbac013?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/d2569afe662be93c926eed1aeb2b17d050ba90b0?format=markdown)
