Skip to content

Instantly share code, notes, and snippets.

@maxjerin
Last active July 24, 2017 01:47
Show Gist options
  • Save maxjerin/23cda3c339d55804b54a4ad551061f33 to your computer and use it in GitHub Desktop.
Save maxjerin/23cda3c339d55804b54a4ad551061f33 to your computer and use it in GitHub Desktop.
# 1 split panes using | and - and open new pane in last directory
bind | split-window -h -c '#{pane_current_path}' # Split panes horizontal
bind - split-window -v -c '#{pane_current_path}' # Split panes vertically
unbind '"'
unbind %
# 2 disable kill window comfirm prompt
bind-key & kill-window
bind-key x kill-pane
# 3 use alt-arrow keys without prefix key to switch panes
bind -n S-Left select-pane -L
bind -n S-Right select-pane -R
bind -n S-Up select-pane -U
bind -n S-Down select-pane -D
# 4 shift arrow to switch windows
bind -n M-Left previous-window
bind -n M-Right next-window
# command delay? We don't want that, make it short
set -sg escape-time 1
# 5 reload tmux config
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# 6 resize pane using command + alt and <arrow>
bind -n M-Left resize-pane -L 5
bind -n M-Down resize-pane -D 5
bind -n M-Up resize-pane -U 5
bind -n M-Right resize-pane -R 5
# 7 default vim color scheme in tmux
set -g default-terminal "screen-256color"
# 8
set -g mouse on
# 9 Start windows and panes at 1, not 0
set -g base-index 1
setw -g pane-base-index 1
# set shell
set -g default-shell /bin/zsh
# set window to open in same directory
bind c new-window -c "#{pane_current_path}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment