Skip to content

Instantly share code, notes, and snippets.

@jexchan
Created January 21, 2014 00:18
Show Gist options
  • Save jexchan/8532041 to your computer and use it in GitHub Desktop.
Save jexchan/8532041 to your computer and use it in GitHub Desktop.
my personal tmux conf
unbind C-b
set -g prefix C-a
setw -g mode-keys vi
set -s escape-time 1
set -g base-index 1
set -g pane-base-index 1
bind r source-file ~/.tmux.conf \; display "reloaded config file!"
# set -g pane-active-border-fg white
# set -g pane-active-border-bg yellow
# set -g status-left "Session:#S"
set -g status-right "#H #[fg-white,bg=default]%a %l:%M:%S %p, %d %b#[default] "
set -g status-justify centre
# split window like vim
# vim's defination of a horizontal/vertical split is revised from tumx's
bind s split-window -h
bind v split-window -v
# move arount panes wiht hjkl, as one would in vim after C-w
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# 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 10
bind > resize-pane -R 10
bind - resize-pane -D 10
bind + resize-pane -U 10
# bind : to command-prompt like vim
# this is the default in tmux already
bind : command-prompt
# ============ All about mouse manuplate =====================
# Copy from https://gist.github.com/paulodeleo/5594773
# 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
# Allow mouse dragging to resize panes
set -g mouse-resize-pane on
# Allow mouse to select windows
set -g mouse-select-window on
# Allow xterm titles in terminal window, terminal scrolling with scrollbar, and setting overrides of C-Up, C-Down, C-Left, C-Right
# (commented out because it disables cursor navigation in vim)
#set -g terminal-overrides "xterm*:XT:smcup@:rmcup@:kUP5=\eOA:kDN5=\eOB:kLFT5=\eOD:kRIT5=\eOC"
# Scroll History
set -g history-limit 30000
# Set ability to capture on start and restore on exit window data when running an application
setw -g alternate-screen on
# Lower escape timing from 500ms to 50ms for quicker response to scroll-buffer access.
set -s escape-time 50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment