Ticket #3755 (accepted enhancement)
Fix emacs keymap
Reported by: | Bad_ptr | Owned by: | zaytsev |
---|---|---|---|
Priority: | trivial | Milestone: | Future Releases |
Component: | mc-key-bindings | Version: | master |
Keywords: | keymap | Cc: | |
Blocked By: | Blocking: | ||
Branch state: | no branch | Votes for changeset: |
Description
It will be more consistent with emacs if the ctrl-w was mapped to cut(currently it is mapped to remove for mc dialogs).
Change History
comment:2 follow-up: ↓ 4 Changed 8 years ago by zaytsev
I agree that Ctrl+W should be Cut rather than Remove in the Emacs keymap, but as far as I know Ctrl-D is "delete one character from the right", so shouldn't it rather be mapped to Delete as in the main keymap, if at all? Also, I think that Ctrl-H should be added to Backspace while we are at it.
comment:3 Changed 8 years ago by zaytsev
- Owner set to zaytsev
- Status changed from new to accepted
- Milestone changed from Future Releases to 4.8.19
comment:4 in reply to: ↑ 2 Changed 8 years ago by Bad_ptr
Replying to zaytsev:
as far as I know Ctrl-D is "delete one character from the right"
Yes, you are right. I mapped it to ctrl-d because I just don't understand how keymaps works in mc.
At first I tried to comment out the Remove = ctrl-w entry and add a Cut = ctrl-w, but it didn't help(why?), then I remapped Remove to ctrl-d and it worked. Now I realized that I can unmap Remove using Remove=.
The same thing in the [editor] section with Paste = ctrl-y and DeleteLine = ctrl-y.
shouldn't it rather be mapped to Delete
It seems like Delete is already doing deletion, however looking at the C code there is a difference between Remove and Delete, but I'm do not understand what is that difference.)
Also, I think that Ctrl-H should be added to Backspace while we are at it.
In emacs the C-h is for help, but I'm not against it.
comment:5 in reply to: ↑ 1 Changed 8 years ago by Bad_ptr
Replying to Bad_ptr:
New version
https://github.com/Bad-ptr/mc/commit/31a3fd0dcb2b4ddd86fb0c2e1d76203246b692e1
Here is an example of how it could be achieved https://github.com/Bad-ptr/mc/commit/404ef82a5b82adb3e7f4783b619903e9e6ab98a3