Skip to content

Instantly share code, notes, and snippets.

@alkorgun
Created November 14, 2020 00:29
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 alkorgun/ee601c969e4da4efe8932dde9882fbe8 to your computer and use it in GitHub Desktop.
Save alkorgun/ee601c969e4da4efe8932dde9882fbe8 to your computer and use it in GitHub Desktop.
# remap prefix from 'C-b' to 'M-x' {alt & x}
set-option -g prefix M-x
bind-key M-x send-prefix
unbind C-b
# set {alt & x}: z -- next, c -- new, v -- tree
bind 'z' next-window
# bind 'c' new-window
bind 'v' choose-tree
# split panes using | and -
bind '\' split-window -h
bind '-' split-window -v
unbind '"'
unbind '%'
# reload config file
bind r source-file /home/alkorgun/.tmux.conf
# switch panes using alt-<arrow> and resize with 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 -- shift is modifier (select, then past -- m3)
set -g mouse on
# also (after 'M-x'):
# [ -- copy mode
# ctrl+space, <arrows>, alt+w -- do copy, q -- don't copy
# ] -- paste
# 0..9 -- go to window number $@
# d -- deattach tmux, then command <tmux a> to attach again
# : -- prompt command
# ? -- shortcuts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment