Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
74 lines (57 sloc) 2.43 KB
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf
set -g history-limit 5000
set -g default-terminal "screen-256color"
set -g status-left-length 24
# uncomment for status/message bar colors that work well with solarized light
# set -g status-style fg=colour7
# set -g status-style bg=colour3
# set -g status-left-style fg=colour7
# set -g status-left-style bg=colour3
# set -g status-right-style fg=colour7
# set -g status-right-style bg=colour3
# set -g message-style fg=colour7
# set -g message-style bg=colour3
# set -g message-command-style fg=colour7
# set -g message-command-style bg=colour3
# clear scrollback history with C-k (does not require prefix)
# To clear both the screen and the scrollback history, you the
# combination C-l C-k.
bind -n C-k clear-history
# move around panes with hjkl, as one would in vim after pressing ctrl-w
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# choose a new binding for last-window because using l for pane navigation
bind b last-window
# New window with default path set to last path
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# fix the escape delay problem when using vim
set -sg escape-time 0
# kill panes and windows without a confirmation prompt
bind x kill-pane
bind & kill-window
# allow resizing panes with the mouse
set -wg mouse on
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Enter copy mode when scrolling over a pane
# https://github.com/tmux/tmux/issues/145#issuecomment-151123624
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
# Apparently my tmux configuration is once again a little out of date
# https://evertpot.com/osx-tmux-vim-copy-paste-clipboard/
# Copy-paste integration
set-option -g default-command "reattach-to-user-namespace -l bash"
# Make tmux play nice with OS X clipboard
# https://robots.thoughtbot.com/tmux-copy-paste-on-os-x-a-better-future
# 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"