Skip to content

Commit

Permalink
Configure tmux to copy/paste
Browse files Browse the repository at this point in the history
  • Loading branch information
drapergeek committed Jul 19, 2013
1 parent 4d4ea77 commit b71dfca
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions tmux.conf
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
# improve colors
set -g default-terminal 'screen-256color'

# enable copy-paste http://goo.gl/DN82E
# enable RubyMotion http://goo.gl/WDlCy
set -g default-command 'reattach-to-user-namespace -l zsh'
setw -g mode-keys vi

# Copy Paste Setup Start
# Provide access to the clipboard for pbpaste, pbcopy (details: http://goo.gl/DN82E)
set-option -g default-command 'reattach-to-user-namespace -l zsh'

# 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 defatul copy-selection key-binding to also use copy-pipe
unbind -t vi-copy Enter
bind-key -t vi-copy Enter copy-pipe 'reattach-to-user-namespace pbcopy'
# Copy Paste Setup End

# act like vim
setw -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
Expand Down

0 comments on commit b71dfca

Please sign in to comment.