-
Notifications
You must be signed in to change notification settings - Fork 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
CMD + Delete in the File Tree #7228
Comments
@huacnlee @JosephTLyons I'm not sure if there's a regression in 0.125.0 or if the PR to resolve this misunderstood the issue. Currently in v0.125.0 when I hit backspace/delete on a file in the tree, it does nothing where it used to prompt for delete. I now have to use CMD+delete. That's not ideal behavior. The original intent was to match VSCode where:
In both cases, the files should go to the Trash |
@SomeoneToIgnore tagging you here since you merged, and this is possibly a regression. |
@shellscape - I'll let Kirill respond about the changes to the deletion in the file tree. As for sending files to the trash can, I think we should probably be doing that: |
Actually I was do that PR was want remove confirm dialog when we triggered CMD-Backspace. But then I reverted that to keep it. Because I don't sure that why Zed team make like that. So I just let Delete and CMD-Backspace can work. Keep the confirm dialog. |
I see. On my end, using just delete no longer does anything. |
Here's a video that I've recorded on the fresh Zed version with both bindings. Screen.Recording.2024-02-29.at.21.31.33.movIn the bottom left corner of the video, keybindings are shown:
Current settings state this
and first, the video ensures that simple backspace does not trigger the deletion modal, then ensures that both cmd-backspace and delete work. Then the video disables the binding for delete and tries the same: now to show, that both backspace and delete do not cause the modal to appear, only cmd-backspace does.
So, both delete and cmd-backspace work. The PRs intent was to restore the missing (at that moment) |
This looks simple to fix: Project panel responds to deletion action and opens the prompt here: zed/crates/project_panel/src/project_panel.rs Lines 797 to 802 in dab886f
One could extend that zed/crates/search/src/buffer_search.rs Lines 43 to 48 in dab886f
and then change the default keybindings (what was edited by the PR that tried to close this issue) to specify something like
but for the new case. The most important part is to ensure that the old version, |
I've never modified them, but I do have this in the default bindings file:
Although as stated above, the |
This shipped to 0.128.0-pre and will hit stable next week |
@ConradIrwin appreciate getting this in! unfortunately this didn't fix the regression where delete/backspace (without the CMD key modifier) does bupkis. It "should" prompt for delete, but it doesn't. |
I think this is finally fixed by #9590, which is in 0.129.0-pre |
@mayfieldiv @ConradIrwin y'all still don't have this quite right. Delete without the CMD modifier sends a file(s) to the trash with VSCode, and that's the desirable behavior. CMD+Delete is straight to the ether, no trash, do not collect $200 dollars. |
Sounds like these things can be consolidated: |
Check for existing issues
Describe the feature
Within Atom and VS Code, it's possible to delete files without being prompted by using the CMD + Delete key combination. Emphasis on without being prompted. This is a pretty clutch feature that's key to productivity and speed of use within the editor.
If applicable, add mockups / screenshots to help present your vision of the feature
FWIW in VS Code this sends something to the trash. A key combo which hard deletes, like
rm -rf
does`, without recovery would also be useful. It's usually 50/50 when I want to delete something to get it out of the way with the chance of needing it later, or wanting to nuke it from orbit.The current
delete
on the file tree items does not send items to trash. Something that could probably use some discussion.The text was updated successfully, but these errors were encountered: