-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtmux.conf
54 lines (45 loc) · 1.62 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
# vim-keys.conf, v1.2 2010/09/12
#
# By Daniel Thau. Public domain.
#
# This configuration file binds many vi- and vim-like bindings to the
# appropriate tmux key bindings. Note that for many key bindings there is no
# tmux analogue. This is intended for tmux 1.3, which handles pane selection
# differently from the previous versions
#unbind ^b
#set -g prefix ^a
# split windows like vim
# vim's definition of a horizontal/vertical split is reversed from tmux's
#bind s split-window -v
#bind v split-window -h
# move around panes with hjkl, as one would in vim after pressing ctrl-w
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# resize panes like vim
# feel free to change the "1" to however many lines you want to resize by, only
# one at a time can be slow
bind < resize-pane -L 5
bind > resize-pane -R 5
bind - resize-pane -D 5
bind + resize-pane -U 5
# bind : to command-prompt like vim
# this is the default in tmux already
bind : command-prompt
# vi-style controls for copy mode
#setw -g mode-keys vi
# from linuxjoy
bind ^u swapp -U # 与上窗格交换 Ctrl-u
bind ^d swapp -D # 与下窗格交换 Ctrl-d
bind-key / command-prompt "split-window 'exec man %%'"
#bind-key S choose-session
bind-key l last-window
# Highlighting the active window in status bar
#set-option -g status-bg black
#set-option -g status-fg white
#setw -g window-status-current-bg white
#setw -g window-status-current-fg black
bind C-e command-prompt "run-shell \"tmux list-windows \| cut -d: -f1\|xargs -I\{\} tmux send-keys -t :\{\} %1\""
bind-key R source-file ~/.tmux.conf \; \
display-message "source-file done"