invalid or unknown command: `bind-key -t vi-copy ....` #754
Comments
Reading the updating man pages, it looks like this is intentional, and we must now write e.g.
Are there any plans to support the old way of declaring copy-mode keybindings? |
No this is how it is now. |
Got it; thanks. |
@nicm |
Conversion how-toFor anyone who finds this for posterity, the full changes should be as follows: Steps
Brief Examplebind-key -t vi-copy v begin-selection becomes bind-key -T copy-mode-vi v send-keys -X begin-selection Longer ExampleFrom my own tmux.conf: Old Way
New Way
|
Latest tmux version has a breaking change: tmux/tmux#754
Missed the `send-keys -X` part here: tmux/tmux#754 (comment)
For details, see tmux/tmux#754
Hmm... I've got my config files synced via a git project. But not all machines have the same version of tmux installed. So I now have to decide where I want my bindings to work if I don't want to maintain two versions of my tmux.conf |
The current version installed is 2.7. See also: tmux/tmux#754 (comment)
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
Also update setup.bash to use old config when system tmux version is before v2.6 tmux/tmux#754
Updated the bindings to the new format thanks to this comment: tmux/tmux#754 (comment) However, when I "yank" selected text, it leaves some weird characters, and still have to hit enter to get out of screen mode. So since I've gotten used to just hitting enter, I'm going to disable the bindings because I don't use them.
Such a pain that they're always changing the damn syntax around! see tmux/tmux#754 (comment) Also, oddly, had to change from "copy-pipe" to "copy-pipe-and-cancel" before it would work.
バージョン2.4でemacs-copyが無くなったり、コマンドの記述方法が変わったみたい。 ref. http://qiita.com/jyotti/items/5383d909f7307762fefa ref. tmux/tmux#754 (comment) 上記を参考にして修正した。 1. -t を -T に変更する 2. emacs-copy を copy-mode に変更する 3. コマンドの先頭に send-keys -X を足す
環境によってtmuxのバージョンがぼちぼち違うので、バージョンで条件分岐する。 マイナーバージョンが1桁である前提なので、2.10とかになったら破綻する。 条件分岐の記法などは tmux/tmux#754 (comment) を見た。
環境によってtmuxのバージョンがぼちぼち違うので、バージョンで条件分岐する。 マイナーバージョンが1桁である前提なので、2.10とかになったら破綻する。 条件分岐の記法などは tmux/tmux#754 (comment) を見た。
tmux/tmux#754 describes the change of configuration syntax, this fixes yank to system clipboard from copy mode.
Just for future reference: the version detection trick based on # @if "$TMUX_VERSION" >= 2.4
if-shell -b '[ "$(echo -e "$TMUX_VERSION\n"2.4 | sort -V | head -n1)" == "2.4" ]' \
'bind -T copy-mode-vi "v" send-keys -X begin-selection; \
bind -T copy-mode-vi "y" send-keys -X copy-pipe-and-cancel "pbcopy"; \
' |
See tmux/tmux#754 for context.
The current way to format the configuration for such commands is explained here: tmux/tmux#754 (comment)
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
It looks like my attempts to bind keys in my
.tmux.conf
withvi-copy
are now failing:Is this expected with current
tmux
?Thanks!
The text was updated successfully, but these errors were encountered: