-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
73 lines (56 loc) · 1.68 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
61
62
63
64
65
66
67
68
69
70
71
72
73
# .tmux.conf
# By Yongheng Lin ([email protected])
# ===============================
# change default terminal
# set -g default-terminal 'screen-256color'
# fall back to ASCII line drawing
# http://stackoverflow.com/questions/8483798
set-option -ga terminal-overrides ',*:enacs@:smacs@:rmacs@:acsc@'
# reload .tmux.conf
bind r source-file $HOME/.tmux.conf
# change prefix
unbind C-b
set -g prefix C-a
# enable mouse mode
set -g mouse on
# when in copy mode, act like vim
set-window-option -g mode-keys vi
# eliminate escape waiting time
set -s escape-time 0
# increase history limit
set -g history-limit 50000
# start from current directory
bind c new-window -c '#{pane_current_path}'
# ===============================
# Pane
# switch pane
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
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
# resize pane
bind -n M-H resize-pane -L 2
bind -n M-J resize-pane -D 2
bind -n M-K resize-pane -U 2
bind -n M-L resize-pane -R 2
# ===============================
# Window
# start window index at 1
set -g base-index 1
# highlight current window
set -g window-status-current-style bg=red,fg=white,blink
set -g window-status-current-format ' #I:#W '
# split window (starting from current directory)
bind | split-window -h -c '#{pane_current_path}'
bind \\ split-window -h -c '#{pane_current_path}'
bind - split-window -v -c '#{pane_current_path}'
bind _ split-window -v -c '#{pane_current_path}'
# switch window
bind , previous-window # <
bind . next-window # >
bind -n M-, previous-window # <
bind -n M-. next-window # >