13
13

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

tmuxでOSXのクリップボードと連携

Posted at

tmux、バージョン1.8からこれでいけるようになっていたとのこと

$ brew install reattach-to-user-namespace

設定に下記を追加

tmux.conf
# 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"

set-option -g prefix C-tしているのでC-gなら-tのところを-gでできます。

参考:http://robots.thoughtbot.com/tmux-copy-paste-on-os-x-a-better-future
参考:http://qiita.com/kkabetani/items/e37ac1e4e0b53c418a35

これでC-tでコピーモードに入ってvで選択範囲を指定して
enterでクリップボードへコピーされるようになります。

知らなかった。ライフチェンジングだ。

13
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
13

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?