Skip to content

Conversation

@ivankra
Copy link

@ivankra ivankra commented Jan 8, 2026

<Del> is a common mapping to delete file/folder in many tree explorers such as vim's netrw or vscode. But in nvim-tree it fails with E21: Cannot make changes, 'modifiable' is off. Let's add it to the default key mappings as an alternative to "d".

@alex-courtis
Copy link
Member

We don't normally change default key mappings, however I reckon this should be OK. @gegoune ?

@gegoune
Copy link
Collaborator

gegoune commented Jan 11, 2026

@alex-courtis I won't be using it (being on MacBook), d is more vim-idiomatic anyway. I am fine with that change, shouldn't break for many users, if any at all.

@ivankra
Copy link
Author

ivankra commented Jan 11, 2026

I think <Del> is a more universal mapping, less surprising to new users, especially anyone coming from vim's builtin netrw which has <Del>/D for delete, d=mkdir. And since there was no mapping for <Del> - it gives an error, it shouldn't really break anyone, unless doing some weird stuff with nvimtree buffers.

Copy link
Member

@alex-courtis alex-courtis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one, didn't realise macbook didn't have a delete...

We'll need to update help with the new mapping before we can merge.

See CI https://github.com/nvim-tree/nvim-tree.lua/actions/runs/20813806250/job/59972103753?pr=3238

@gegoune
Copy link
Collaborator

gegoune commented Jan 11, 2026

Nice one, didn't realise macbook didn't have a delete...

It does, fn+backspace is delete, just so much easier to type d.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants