Skip to content

Commit

Permalink
[tmux.conf] Add config to do copy-paste less painful
Browse files Browse the repository at this point in the history
  • Loading branch information
apraditya committed Jul 27, 2015
1 parent fcbeb25 commit f54019d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tmux.conf
Expand Up @@ -5,6 +5,9 @@ set -g prefix C-a
# improve colors
set -g default-terminal 'screen-256color'

# Enable copy-paste
set -g default-command "reattach-to-user-namespace -l zsh"

# act like vim
setw -g mode-keys vi
bind h select-pane -L
Expand All @@ -16,6 +19,24 @@ bind-key -r C-l select-window -t :+

set -g prefix2 C-s


# Make mouse useful in copy mode
setw -g mode-mouse on
#
# Allow mouse to select which pane to use
set -g mouse-select-pane on

# Turn on vi bindings in copy mode
set-option -g status-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"

# Copy to OSX clipboard
bind-key y run-shell "tmux save-buffer - | reattach-to-user-namespace pbcopy"


# start window numbers at 1 to match keyboard order with tmux window order
set -g base-index 1
set-window-option -g pane-base-index 1
Expand Down

0 comments on commit f54019d

Please sign in to comment.