Closed jbnicolai closed 9 years ago
@bruno- I was unable to make the test work, could you have a quick look why it's failing?
Hey @jbnicolai, the new tests are failing. That's okay, I can probably look what's wrong before merging.
I see this search uses prefix + C-h
.. the same as tmux-pain-control. In fact all of h
, shift + h
and C-h
are "taken". Do we have any other option that does not clash with built-in or plugin key bindings? alt + h
maybe?
@bruno- alt + h
sounds good, let me update quickly.
@bruno- although, is there a reason tmux-pain-control
uses both prefix + [hjll]
and prefix + C-[hjkl]
? The first seems sufficient, and if end-users want to change it they can. This would allow copycat to use prefix + C-h
for hashes, which would be consistent with the other bindings.
Hey @jbnicolai, I'll look into the tests and merge this.
Yea, there's a reason for additional/duplicate keybindings, but it's subtle. In short, it enables the user to constantly hold the ctrl
key pressed while navigating across panes which is faster and less straining for the pinky finger.
Example: you're using C-a
as a prefix and you have 5 vertical splits open. You wanna go from the leftmost one all the way to the right. With these additional keybindings you can:
ctrl
key the whole time (this is a win)a + l
4 times in a row and the cursor will move to the rightmost paneThis would be more cumbersome if the additional keybindings weren't defined.
This was merged via 279db60 and tests are fixed in 52567df.
Thanks @jbnicolai!
Instead of having distinct key combinations for each thing.. perhaps the key combinations should be like vim-chords
.
The advantage of that is you are essentially typing additional characters in a very systematic way. Its easy to remember. Further, each additional alphabetic key typed increases the parameter space
available for mapping commands. So these kinds of clashes wont happen between multiple plugins
Adds matching for full or abbreviated SHA-1 hashes, as used by git.