-
Notifications
You must be signed in to change notification settings - Fork 579
Add simple vim mode #959
base: master
Are you sure you want to change the base?
Add simple vim mode #959
Conversation
This commit adds a "vim_mode" setting (false/`0` by default) that causes keys to be remapped in the following way by the `ScreenManager`: + h -> LEFT + j -> DOWN + k -> UP + l -> RIGHT + LEFT -> h (toggle help) + DOWN -> j (noop) + UP -> k (open kill menu) + RIGHT -> l (lsof current process) + K (Shift+K) -> k (open kill menu) + J (Shift+J) -> K (toggle show/hide kernel threads) + L (Shift+L) -> l (lsof current process) I couldn't figure out where the manpage documentation is in the repo, though I admittedly did not look particularly hard. I believe this change would be a welcome option for heavy vim users like myself who would like a familiar way to get around in htop.
For info on htop vim_mode, see hishamhm/htop#959
I would like to have an option for vim bindings in normal htop though I prefer the shortcuts implemented by this fork: https://aur.archlinux.org/packages/htop-vim-git |
I'll have to check that out! My implementation has issues with the may I remap the keys so that typing |
See #98 Would be nice to have a well maintained and packaged fork with vim bindings. |
I like this patch overall, though I would leave the keys to what they do at the moment and do something like:
instead, remapping the arrow keys like that wouldn't be very intuitive in my opinion. |
Btw there are other system monitors with vim bindings. I'm currently using https://github.com/ClementTsang/bottom |
Thanks for the suggestions. Can finally switch to a modern one with more natural key-bindings. |
Merged here: htop-dev/htop@5c5a599 |
This PR adds a "vim_mode" setting (false/
0
by default) that causes keys to be remapped in the following way by theScreenManager
:I couldn't figure out where the manpage documentation is in the repo, though I admittedly did not look particularly hard.
I believe this change would be a welcome option for heavy vim users like myself who would like a familiar way to get around in htop.