-
Notifications
You must be signed in to change notification settings - Fork 105
Vi-like bindings for tmux? #154
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
Comments
I do effectively use
It's true that I could add some more bindings beyond the ones you get with |
Make them a bit more (but not entirely) Vim-like. Inspired by: - #154 `y` is currently unbound, so can be trivially set to the same as `Enter`. `v`, `C-v`, and `V` all have existing bindings. We make them a bit more Vim-like: - `v`: Before, toggled rectangular selection mode. Now, the first `v` engages `VISUAL` mode and the second `v` disengages it. - `V`: Before, always started a new `VISUAL LINE` selection. Now, the first `V` engages `VISUAL LINE` mode and the second `V` disengages it. - `C-v`: Before, toggled rectangular selection mode. Now, the first `C-v` engages `VISUAL BLOCK` mode and the second `C-v` disengages it. This is different from Vim, where if I press `v`, `V`, then `C-v`, I'll first enter `VISUAL` mode, and then `VISUAL LINE` and then `VISUAL BLOCK`. I could make this more like Vim with a bit of work: ie. I could set a variable when entering each mode to show which mode I'm in (eg. `VISUAL` could be `1`, `VISUAL LINE` could be `2`, and `VISUAL BLOCK` could be `3`), and then I could check the value in each of the bindings; ie: - If you hit `v`, I could set the value to `1`. - If you then hit `V`, I go to `VISUAL LINE` if the value is not `2`; otherwise I would clear the selection. Not sure if I can be bothered doing that right now (I'd have to change all the places that you can get into the `VISUAL` modes, such as mouse bindings), but I think I'll do it in a future iteration.
Hey, just curious why you don't use
setw -g mode-keys vi
for vi-like bindings for tmux, or more comprehensive vim bindings, It seems like you only try to use some of these bindings for copy mode and window movement.Do you think it doesn't work as well in tmux? I know some veteran vim users still prefer e.g. emacs over vim-mode for their interactive shell. Or perhaps there's value in sticking with the defaults where possible, though I don't see that point in that unless one already makes such insignificant changes from the defaults.
The text was updated successfully, but these errors were encountered: