-
-
Notifications
You must be signed in to change notification settings - Fork 639
feat: add default <Del> mapping for api.fs.remove #3238
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
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.
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
It does, |
|
Added |
alex-courtis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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".