feat: add default <Del> mapping for api.fs.remove#3238
feat: add default <Del> mapping for api.fs.remove#3238alex-courtis merged 2 commits intonvim-tree:masterfrom
Conversation
|
We don't normally change default key mappings, however I reckon this should be OK. @gegoune ? |
|
@alex-courtis I won't be using it (being on MacBook), |
|
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. |
alex-courtis
left a comment
There was a problem hiding this comment.
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
It does, |
|
Added |
alex-courtis
left a comment
There was a problem hiding this comment.
It looks like we're missing an addition in help: https://github.com/nvim-tree/nvim-tree.lua/actions/runs/20954090775/job/60215519930?pr=3238
You should run make help-update: https://github.com/nvim-tree/nvim-tree.lua/blob/000ca6bcddd11ec0bf782e3c9794838f4c6d7384/CONTRIBUTING.md#adding-new-actions
|
Oh, I see, there were two places in the help file. I ran |
alex-courtis
left a comment
There was a problem hiding this comment.
Many thanks for your contribution!
<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".