Skip to content

Instantly share code, notes, and snippets.

@alkorgun
Created Nov 14, 2020
Embed
What would you like to do?
# 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