-
Notifications
You must be signed in to change notification settings - Fork 581
Vim-like movement #98
Comments
Hi! There's no way for enabling vim-like movement in the current release. The keybindings clash with existing commands, so I'm wary of adding that. But thanks for the suggestion, I'll keep it filed in the "wishlist" label. |
Here is a patch which offers very basic vi like keybindings https://pastee.org/bny2j |
👍 |
You are awesome, thanks! On May 24, 2014 3:38:48 AM CEST, Michael notifications@github.com wrote:
-- Calm Down and Keep Seeding -- |
One vote up +1 for this wish! |
Hello, was this ever implemented? Thanks |
it was added as Alt+{h,j,k,l}. |
Hmm, weird, my version of htop is 2.0.1, but it doesn't seem to work. |
It works (here on my machine with german keyboard layout) with pressing the left-alt button (alt and not alt-gr) |
@zkanda it might be a limitation of your terminal. Open a shell, type hisham@pointer ~]read
hjkl^[h^[j^[k^[l |
My terminal seems to be working as expected. Using gnome-terminal. Can you please confirm this behavior? |
@zkanda That's odd! Keys from |
Would it be possible to set this as a config variable at compile-time or preferably in an rc file or on the command line? I use Alt+{h,j,k,l} for moving through windows in my tiled window manager so the plain keys (non-Alt) in the patch above work best for me. |
Okay, I tried it on I'm on |
I use htop on OS X 10.11.5, I tested under following combinations: |
Doesn't work in my mac with Iterm nor Terminal too. I was thinking about an alternative key binding user can switch to in settings. This way nothing will break for other users but users who prefer to use vim key bindings can use it by activating it in settings. |
@sassanh, for Alt+{h,j,k,l} to work as expected in macOS, the Option key needs to be configured as |
Still doesn't work not in iTerm nor Terminal. I tried all 3 choices for Option key in iTerm and the 2 in Terminal. Also htop is not the only application I run in terminal. Changing option key will ruin my key bindings for vim, fish, etc. |
I ended up using https://github.com/KoffeinFlummi/htop-vim. |
Here's a more up-to-date patch (it works with v2.2.0) that implements this if anyone is interested: https://gist.github.com/bbugyi200/c066a5b56819c629f41f8805804e5204 |
The patch is very readable, but for the lazy you may be wondering how to access the old htop functionality previously mapped to "hkl". The answer is:
|
Hi, I've searched in the archive of the mailing list and didn't find anything... Sorry if it's been asked before (I guess it must have)
Is there anyway of setting the movement commands like vim? hjkl?
Thank you
The text was updated successfully, but these errors were encountered: