Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

tmux: Finally add the OS X pasteboard hack

  • Loading branch information...
commit f2df064e51023414c444dc172238fdbb09373151 1 parent 04c8033
@ches authored
Showing with 13 additions and 4 deletions.
  1. +13 −4 .tmux.conf
View
17 .tmux.conf
@@ -5,6 +5,9 @@
# Global Settings #
###########################################################################
+# Use the OS X pasteboard hack if available
+if 'command -v reattach-to-user-namespace >/dev/null' 'set -g default-command "reattach-to-user-namespace -l bash"'
+
# tmux is supposed to figure out 256-color support from terminfo and set this,
# but it seems to fail anyway. Kind of sucks for when I run Terminal.app...
# TODO: we can use shell here to be smart-ish
@@ -59,6 +62,10 @@ set -g set-titles on
# wm window title string (uses statusbar variables)
# set -g set-titles-string "#I:#W"
+# Zero-based indexing for windows and panes isn't terribly sensible.
+set-option -g base-index 1
+set-window-option -g pane-base-index 1
+
# the panes display and status messages don't show very long by default
set -g display-panes-time 2000
set -g display-time 2000
@@ -71,7 +78,7 @@ set -g display-time 2000
# train myself on some tmux defaults that I like better than screen's
# reload settings
-bind-key R source-file ~/.tmux.conf
+bind-key R source-file ~/.tmux.conf; display-message "tmux config reloaded"
# toggle previous window like screen, although prefix-l will
# be easy to get used to
@@ -104,9 +111,11 @@ bind-key Q switchc -t0
bind-key W switchc -t1
bind-key E switchc -t2
-# make copy mode screen-style, with useful mouse
-# unbind [
-bind Escape copy-mode
+# Make copy mode more vim-like.
+bind -t vi-copy v begin-selection
+bind -t vi-copy y copy-selection
+bind -t vi-copy C-v rectangle-toggle
+bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
# I'll give these mnemonic split bindings a try
# unbind %
Please sign in to comment.
Something went wrong with that request. Please try again.