Closed bosr closed 2 years ago
Hi Bruno have you had some time to give a look at this PR?
Regards
Rebased on latest master
Hey, sorry for the wait. I like the idea.
What do you say we make t
the default key-table? This plugin introduces a lot of key-bindings so that would make sense.
How do we handle support for older tmux versions, 1.9
and up?
No problem, thanks for the feedback.
Regarding versions <2.1
, I had not noticed they do not support key-table argument for bind-key
, thank you.
As I don't know tmux
enough to find a workaround for these versions, I have decided to completely disable the mechanism and keep the bindings in the prefix
key-table. Hence I could not change the default key-table to t
.
Here is an update that I tested on Debian Jessie (tmux 1.9
, bash 4.3
) and on OS X 10.11 (tmux 2.1
, bash 3.2
). The tmux -V
version checking happens only once: if 2.1+ then a global variable is set, otherwise not set. By the way, I was not very efficient at obtaining a syntax that works with those two major versions of bash, so comments are welcome.
Cheers
rebased on master
Progress looks good, I left a couple code-related suggestions.
What do you think about adding a test that checks key table works good? This might be hard-ish, let me know how you feel about it.
Also, what do you say we make t
the default key-table for tmux version 2.1
and above ?
Thanks Bruno, I'll have a look at it this evening. Edit: shortly
@bruno-,
Thank you for the very constructive feedback! The code is much cleaner now.
1.9
and 2.1
t
if key-table is supportedTell me how you feel about it.
I still have to add the tests, but I have not looked into it yet.
Oh, I was not aware it had been merged! Great, thanks.
My bad, I got confused with an old PR from tmux-yank
How about this PR? There was no activity for about two years now.
Hi, I have been using the code from this PR for the last 2 years without a problem, but I never rebased on master, so if the functionality still makes sense then the conflicts need to be solved. On my side I have no time now for this.
cleanup!
Hi,
Here is a new
@copycat_keytable_option
option that, if set, uses a custom keytable for all searches except/
(this one is too useful to be altered). If this option is not set, the defaultprefix
keytable is used.With this, my shortcuts are less crowded and I find them easier to remember.
I have added instructions in the README.md and customisations.md
Regards