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

invalid or unknown command: `bind-key -t vi-copy ....` #754

Closed
kevinushey opened this Issue Feb 1, 2017 · 12 comments

Comments

10 participants
@kevinushey

kevinushey commented Feb 1, 2017

It looks like my attempts to bind keys in my .tmux.conf with vi-copy are now failing:

/Users/kevin/.tmux.conf:25: invalid or unknown command: bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
/Users/kevin/.tmux.conf:26: invalid or unknown command: bind-key -t vi-copy v begin-selection
/Users/kevin/.tmux.conf:30: invalid or unknown command: bind-key -t vi-copy Y copy-end-of-line
/Users/kevin/.tmux.conf:31: invalid or unknown command: bind-key -t vi-copy V rectangle-toggle
/Users/kevin/.tmux.conf:32: invalid or unknown command: bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
/Users/kevin/.tmux.conf.2:3: invalid or unknown command: bind-key -t vi-copy PPage page-up
/Users/kevin/.tmux.conf.2:4: invalid or unknown command: bind-key -t vi-copy NPage page-down

Is this expected with current tmux?

$ tmux -V
tmux master

Thanks!

@kevinushey

This comment has been minimized.

Show comment
Hide comment
@kevinushey

kevinushey Feb 1, 2017

Reading the updating man pages, it looks like this is intentional, and we must now write e.g.

bind-key -t vi-copy ...        # before
bind-key -T copy-mode-vi ...   # after

Are there any plans to support the old way of declaring copy-mode keybindings?

kevinushey commented Feb 1, 2017

Reading the updating man pages, it looks like this is intentional, and we must now write e.g.

bind-key -t vi-copy ...        # before
bind-key -T copy-mode-vi ...   # after

Are there any plans to support the old way of declaring copy-mode keybindings?

@nicm

This comment has been minimized.

Show comment
Hide comment
@nicm

nicm Feb 1, 2017

Contributor

No this is how it is now.

Contributor

nicm commented Feb 1, 2017

No this is how it is now.

@kevinushey

This comment has been minimized.

Show comment
Hide comment
@kevinushey

kevinushey Feb 1, 2017

Got it; thanks.

kevinushey commented Feb 1, 2017

Got it; thanks.

@kevinushey kevinushey closed this Feb 1, 2017

@timotheecour

This comment has been minimized.

Show comment
Hide comment
@timotheecour

timotheecour Apr 23, 2017

@nicm
can this new syntax be backported to previous version of tmux? so that tmux.conf will work in either

timotheecour commented Apr 23, 2017

@nicm
can this new syntax be backported to previous version of tmux? so that tmux.conf will work in either

oblitum added a commit to oblitum/dotfiles that referenced this issue Apr 24, 2017

@flowchartsman

This comment has been minimized.

Show comment
Hide comment
@flowchartsman

flowchartsman Apr 26, 2017

Conversion how-to

For anyone who finds this for posterity, the full changes should be as follows:

Steps

  1. replace -t with -T
  2. replace vi-<name> with <name>-mode-vi
  3. prefix the command with send-keys -X

Brief Example

bind-key -t vi-copy v begin-selection

becomes

bind-key -T copy-mode-vi v send-keys -X begin-selection

Longer Example

From my own tmux.conf:

Old Way

bind-key -t vi-edit Up history-up
bind-key -t vi-edit Down history-down
unbind-key -t vi-copy Space     ;   bind-key -t vi-copy v begin-selection
unbind-key -t vi-copy Enter     ;   bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
unbind-key -t vi-copy C-v       ;   bind-key -t vi-copy C-v rectangle-toggle
unbind-key -t vi-copy [         ;   bind-key -t vi-copy [ begin-selection
unbind-key -t vi-copy ]         ;   bind-key -t vi-copy ] copy-selection

New Way

bind-key -T edit-mode-vi Up send-keys -X history-up
bind-key -T edit-mode-vi Down send-keys -X history-down
unbind-key -T copy-mode-vi Space     ;   bind-key -T copy-mode-vi v send-keys -X begin-selection
unbind-key -T copy-mode-vi Enter     ;   bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
unbind-key -T copy-mode-vi C-v       ;   bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
unbind-key -T copy-mode-vi [         ;   bind-key -T copy-mode-vi [ send-keys -X begin-selection
unbind-key -T copy-mode-vi ]         ;   bind-key -T copy-mode-vi ] send-keys -X copy-selection

flowchartsman commented Apr 26, 2017

Conversion how-to

For anyone who finds this for posterity, the full changes should be as follows:

Steps

  1. replace -t with -T
  2. replace vi-<name> with <name>-mode-vi
  3. prefix the command with send-keys -X

Brief Example

bind-key -t vi-copy v begin-selection

becomes

bind-key -T copy-mode-vi v send-keys -X begin-selection

Longer Example

From my own tmux.conf:

Old Way

bind-key -t vi-edit Up history-up
bind-key -t vi-edit Down history-down
unbind-key -t vi-copy Space     ;   bind-key -t vi-copy v begin-selection
unbind-key -t vi-copy Enter     ;   bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
unbind-key -t vi-copy C-v       ;   bind-key -t vi-copy C-v rectangle-toggle
unbind-key -t vi-copy [         ;   bind-key -t vi-copy [ begin-selection
unbind-key -t vi-copy ]         ;   bind-key -t vi-copy ] copy-selection

New Way

bind-key -T edit-mode-vi Up send-keys -X history-up
bind-key -T edit-mode-vi Down send-keys -X history-down
unbind-key -T copy-mode-vi Space     ;   bind-key -T copy-mode-vi v send-keys -X begin-selection
unbind-key -T copy-mode-vi Enter     ;   bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
unbind-key -T copy-mode-vi C-v       ;   bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
unbind-key -T copy-mode-vi [         ;   bind-key -T copy-mode-vi [ send-keys -X begin-selection
unbind-key -T copy-mode-vi ]         ;   bind-key -T copy-mode-vi ] send-keys -X copy-selection

trautwein added a commit to neowork/dotfiles that referenced this issue Apr 27, 2017

oblitum added a commit to oblitum/dotfiles that referenced this issue Apr 28, 2017

frankyjuang referenced this issue in frankyjuang/confJuang Apr 30, 2017

kogakure added a commit to kogakure/dotfiles that referenced this issue May 2, 2017

joshpencheon added a commit to joshpencheon/dotfiles that referenced this issue May 2, 2017

zackhsi added a commit to zackhsi/dotfiles that referenced this issue May 2, 2017

EvanPurkhiser added a commit to EvanPurkhiser/dots-personal that referenced this issue May 6, 2017

EvanPurkhiser added a commit to EvanPurkhiser/dots-personal that referenced this issue May 9, 2017

nhanb added a commit to nhanb/dotfiles that referenced this issue May 9, 2017

update tmux conf
Latest tmux version has a breaking change:
tmux/tmux#754

brianfoshee added a commit to brianfoshee/dotfiles that referenced this issue May 10, 2017

Ran4 pushed a commit to Ran4/dotfiles that referenced this issue May 10, 2017

j-un pushed a commit to j-un/osx-provisioner that referenced this issue May 12, 2017

Reesi82 added a commit to Reesi82/dotfiles that referenced this issue May 12, 2017

Reesi82 added a commit to Reesi82/dotfiles that referenced this issue May 12, 2017

rjbernaldo added a commit to rjbernaldo/dotfiles that referenced this issue May 14, 2017

nhanb added a commit to nhanb/dotfiles that referenced this issue May 14, 2017

hale added a commit to hale/dotfiles that referenced this issue May 14, 2017

manishlad added a commit to manishlad/dotfiles that referenced this issue May 14, 2017

luugiathuy added a commit to luugiathuy/dotfiles that referenced this issue May 15, 2017

axelhodler pushed a commit to axelhodler/dotfiles that referenced this issue May 16, 2017

brianriley added a commit to brianriley/dotfiles that referenced this issue May 16, 2017

igorsnunes added a commit to igorsnunes/dotfiles that referenced this issue Nov 23, 2017

Update bind-key command for tmux file
Bind key command has a new syntax. See:
tmux/tmux#754

knightjoel added a commit to knightjoel/dotfiles that referenced this issue Nov 26, 2017

tskogberg added a commit to tskogberg/dotfiles that referenced this issue Nov 28, 2017

zlot added a commit to zlot/dotfiles that referenced this issue Dec 4, 2017

[tmux] Fix copy mode key bindings
Ref:

* tmux/tmux@76d6d36
* tmux/tmux#754 (comment)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Fix #55
Close #56

grumpy123 added a commit to grumpy123/dotfiles that referenced this issue Dec 6, 2017

Makohoek added a commit to Makohoek/dotfiles that referenced this issue Dec 13, 2017

tmux: deal with new version changes
tmux new version breaks stuff!
Fortunetly some nice people on github documented how to migrate.

See:
tmux/tmux#754

Signed-off-by: Mattijs Korpershoek <mattijs.korpershoek@gmail.com>

khiet added a commit to khiet/dotfiles that referenced this issue Jan 2, 2018

fatso83 added a commit to fatso83/dotfiles that referenced this issue Jan 8, 2018

florisdf pushed a commit to florisdf/dotfiles that referenced this issue Jan 26, 2018

tfiala added a commit to tfiala/vim-config that referenced this issue Jan 27, 2018

Updated tmux configuration for bind-key command changes
These changes appear to be required for tmux 2.5+.  They are
not backwards compatible.

See this Github entry for details on conversion:
tmux/tmux#754

mittwinter pushed a commit to mittwinter/dotfiles that referenced this issue Feb 1, 2018

ebouchut added a commit to ebouchut/dotfiles that referenced this issue Feb 8, 2018

Tmux: Fix mode vi-copy no longer supported
Update configuration syntax to make it 2.4+ compatible

See: tmux/tmux#754\#issuecomment-297452143

yuya373 added a commit to yuya373/dotfiles that referenced this issue Feb 8, 2018

Makohoek added a commit to Makohoek/dotfiles that referenced this issue Feb 27, 2018

tmux: fix vi-copy keybindings
New tmux version made an update that broke my .tmux.conf file.
They replaced the bind-key syntax.

Being lazy, i did not rtfm, just looked on Github and found this
wonderful post:

tmux/tmux#754 (comment)

Thank you, @flowchartsman :)

Signed-off-by: Mattijs Korpershoek <mattijs.korpershoek@gmail.com>

davejamesmiller added a commit to davejamesmiller/dotfiles that referenced this issue Mar 19, 2018

colby added a commit to colby/dotfiles that referenced this issue Mar 25, 2018

kamelzcs pushed a commit to kamelzcs/dotfile that referenced this issue Mar 29, 2018

linden2015 added a commit to linden2015/software-meta that referenced this issue Apr 6, 2018

hansnow added a commit to hansnow/dotfiles that referenced this issue Apr 8, 2018

wbyoung added a commit to wbyoung/dotfiles that referenced this issue Apr 14, 2018

Upgrade bind setup for tmux upgrade
The current version installed is 2.7.

See also: tmux/tmux#754 (comment)

@mkucijan mkucijan referenced this issue May 5, 2018

Closed

tmux warnings #38

tpenguinltg added a commit to tpenguinltg/dotfiles that referenced this issue May 25, 2018

sharmaeklavya2 added a commit to sharmaeklavya2/dotfiles that referenced this issue Jun 27, 2018

keur added a commit to keur/dotfiles that referenced this issue Jul 9, 2018

tmux: portable vim keybindings
In tmux version 2.4 some keybindings changed, including vi-style
copy and paste. Systems with older versions of tmux now
supported.

Idea taken from:
tmux/tmux#754

bryanburgers pushed a commit to bryanburgers/dotfiles that referenced this issue Jul 26, 2018

davidandreoletti added a commit to davidandreoletti/dotfiles that referenced this issue Aug 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment