Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

98 lines (80 sloc) 3.235 kb
# for tmux: export 256color
set -g default-terminal "screen-256color"
# set fish as shell
set-option -g default-shell "/usr/local/bin/fish"
# Enable paste
# http://uber.pro/here-fishy-fishy/
#set-option -g default-command "which reattach-to-user-namespace > /dev/null; and reattach-to-user-namespace -l /usr/local/bin/fish || /usr/local/bin/fish"
#set-option -g default-command 'exec reattach-to-user-namespace -l fish'
if-shell 'test "$(uname -s)" = Darwin' 'set-option -g default-command "exec reattach-to-user-namespace -l fish"'
# Use Ctrl-a instead of Ctrl-b
unbind C-b
set -g prefix C-a
bind C-a send-prefix
################ Testing Thoughtbot ################
# Act like Vim
# https://github.com/thoughtbot/dotfiles/blob/master/tmux.conf
setw -g mode-keys vi
#bind h select-pane -L
#bind j select-pane -D
#bind k select-pane -U
#bind l select-pane -R
#bind-key -r C-h select-window -t :-
#bind-key -r C-l select-window -t :+
########## With Vim plugin
# http://robots.thoughtbot.com/post/53022241323/seamlessly-navigate-vim-and-tmux-splits
# Smart pane switching with awareness of vim splits
#bind -n C-k run-shell 'tmux-vim-select-pane -U'
#bind -n C-j run-shell 'tmux-vim-select-pane -D'
#bind -n C-h run-shell 'tmux-vim-select-pane -L'
#bind -n C-l run-shell 'tmux-vim-select-pane -R'
#bind -n "C-\\" run-shell 'tmux-vim-select-pane -l'
######## Tmux + Vim
# https://github.com/christoomey/vim-tmux-navigator
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"'
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
bind C-l send-keys 'C-l'
# Enable mouse support
#set -g mode-mouse on
# Just click it
set-option -g mouse-select-pane on
set-option -g mouse-select-window on
set-option -g mouse-resize-pane on
# Make sure 1 is the first window
set -g base-index 1
set-window-option -g pane-base-index 1
# renumber windows sequentially after closing any of them
set -g renumber-windows on
# Faster command sequence
#set -s escape-time 0
# Keep scrollback
set -g history-limit 10000
#### Visual help #######
# http://lukaszwrobel.pl/blog/tmux-tutorial-split-terminal-windows-easily
#setw -g monitor-activity on
#set -g visual-activity on
# $Id: vim-keys.conf,v 1.2 2010-09-18 09:36:15 nicm Exp $
#
# vim-keys.conf, v1.2 2010/09/12
#
# By Daniel Thau. Public domain.
#
# This configuration file binds many vi- and vim-like bindings to the
# appropriate tmux key bindings. Note that for many key bindings there is no
# tmux analogue. This is intended for tmux 1.3, which handles pane selection
# differently from the previous versions
# split windows like vim
# vim's definition of a horizontal/vertical split is reversed from tmux's
bind s split-window -v
bind v split-window -h
# resize panes like vim
# feel free to change the "1" to however many lines you want to resize by, only
# one at a time can be slow
#bind < resize-pane -L 5
#bind > resize-pane -R 5
#bind - resize-pane -D 5
#bind + resize-pane -U 5
Jump to Line
Something went wrong with that request. Please try again.