-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtmux.conf
60 lines (46 loc) · 1.24 KB
/
tmux.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
###############
### General ###
###############
set -g default-terminal "screen-256color" # 256 colors
set -g history-limit 10000 # scrollback size
set -g mouse on # allow mouse mode and sane scrolling
# Windows and panes numbering starts from 1
set -g base-index 1
set -g pane-base-index 1
# Disable window auto-rename
set-option -g allow-rename off
# Faster key repeat
set -s escape-time 0
####################
### Key bindings ###
####################
# Set new prefix to Ctrl-a
unbind C-b
set -g prefix C-a
# Send commands to a nested session with <prefix>-a
unbind a
bind a send-prefix
# Edit tmux config with <prefix>-e
unbind e
bind e split-window -h "vim ~/.tmux.conf"
# Reload config with <prefix>-r
unbind r
bind r source-file ~/.tmux.conf \;\
display 'Reloaded tmux config.'
# Name windows on creation with <prefix>-C
unbind C
bind C command-prompt -p "Name of new window: " "new-window -n '%%'"
# Vertical splits with <prefix>-|
unbind |
bind | split-window -h
# Horizontal splits with <prefix>--
unbind -
bind - split-window
# Moving around panes a-la-vim
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
# Exit the session with <prefix>-C-q
unbind C-q
bind C-q kill-session