Help us understand the problem. What is going on with this article?

tmuxのバージョンを1.8にアップデートして、クリップボードの設定

More than 5 years have passed since last update.

現在のバージョン確認

tmux -V
tmux 1.7

アップグレード

brew upgrade tmux

tmux -V
tmux 1.8

アップグレードされてますね。

で、ここからが今回アップグレードしてみようと思った理由。
tmuxの1.8からcopy-pipeが導入されているらしい。
参考 http://robots.thoughtbot.com/post/55885045171/tmux-copy-paste-on-os-x-a-better-future

このおかげで、OSのクリップボードに取り込む処理が不要になっている。

tmux.confに以下を追加
(キーバインドを変更したい場合は変更してください。)

# Use vim keybindings in copy mode
setw -g mode-keys vi

# Setup 'v' to begin selection as in Vim
bind-key -t vi-copy v begin-selection
bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"

# Update default binding of `Enter` to also use copy-pipe
unbind -t vi-copy Enter
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"

これで、vで選択してyでクリップボードにコピーされます。

k6i
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした