Skip to content

Instantly share code, notes, and snippets.

@oglops
Created January 26, 2017 02:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oglops/8719441123420194edfce8f0b8ca733a to your computer and use it in GitHub Desktop.
Save oglops/8719441123420194edfce8f0b8ca733a to your computer and use it in GitHub Desktop.
tmux.conf example
# config example from http://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf
# switch panes using Alt-arrow without prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Enable mouse control (clickable windows, panes, resizable panes)
# set -g mouse-select-window on
# set -g mouse-select-pane on
# set -g mouse-resize-pane on
# don't rename windows automatically
# set-option -g allow-rename off
# powerline
# source ~/powerline/powerline/bindings/tmux/powerline.conf
#set-option -g default-terminal "screen-256color"
set-window-option -g mode-keys vi
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
# https://til.hashrocket.com/posts/d4d3c1fea6-quickly-edit-and-reload-tmux-configuration
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
bind-key M split-window -h "vim ~/.tmux.conf"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment