Skip to content

Instantly share code, notes, and snippets.

@mcastelino
Last active August 8, 2016 23:50
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 mcastelino/2e313933d7643b4d1ebe0b3f48f366e0 to your computer and use it in GitHub Desktop.
Save mcastelino/2e313933d7643b4d1ebe0b3f48f366e0 to your computer and use it in GitHub Desktop.
tmux configuration with logical key sequences and co-existence with mobaxterm
# 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 h split-window -h
bind v 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
# make the first window number start at 1
set-option -g base-index 1
set-window-option -g pane-base-index 1
# from http://endot.org/2011/12/06/my-tmux-configuration/
# keybindings to make resizing easier
bind -r C-h resize-pane -L
bind -r C-j resize-pane -D
bind -r C-k resize-pane -U
bind -r C-l resize-pane -R
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment