-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
94 lines (87 loc) · 3.25 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# tmux offers the following commands:
#
# tmux new [-s<sessionname>] crete new tmux session
# tmux ls list all running tmux sessions
# tmux a[ttach] -t<session> attach to a running tmux session
# tmux kill-server quit tmux-server and clients
#
# as well as the following shortcuts (preceded by the anchor key)
#
# Misc
# t display time
# ? show all keyboard shortcuts
# : enter command mode
#
# Sessions
# s (session) list and switch between sessions
# d detach current session
# ) switch to next session
# ( switch to previous session
#
# Windows (windows are like tabs in vim)
# c create new window in session
# & close current window (requires confirmation)
# , rename current window
# w list windows
# l toggle between two last focused windows (set to # here)
# p switch to previous window
# n switch to next window
# ℕ change to window number... (ℕ is a placeholder for {1,2,3,...})
#
# Panes
# " split pane horizontal
# % split pane vertical
# x close current pane
#
# <C-{arrow}> resize pane {left,right,up,down}
# z zoom in/out pane (toggle maximise)
# ! break out current pane to new window
#
# o switch to next pane
# <C-o> swap panes
# q show pane numbers (while showing switch by pressing respective number)
# {arrow} move one pane {left,right,up,down}
#
#
# Copy mode (enter visual mode via <prefix>[, paste selection via <prefix>])
#
# Copy mode is entered via <prefix>[. In this mode the cursor can be moved freely
# on the buffer. When set to vi controls vi-like movements are allowed.
# Pressing <space> (or in current configuration "v") starts selection mode.
# The selection is copied via <CR> (or in current copy "y")
# To paste the current selection use <prefix>]
#
#
# Synchronize panes
#
# To send the same commands (keystrokes) to multiple panes, first
# create the required pane setup and then launch the command
# :set synchronize-panes on
#
# set anchor key from <C-b> to <C-a>
# early tmux development took place in GNU screen disabling <C-a>
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# enable mouse scrolling support
set -g mouse on
# configure copy mode
setw -g mode-keys vi # use vim like controls in "copy mode"
bind-key -T copy-mode-vi 'v' send -X begin-selection # v : begin selection
bind-key -T copy-mode-vi 'C-v' send -X rectangle-toggle # <C-v>: begin block-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection # y : yank
## Panes
# add additional easy-to-remember split pane commands
bind | split-window -h
bind - split-window -v
# move between panes using vim movement keys
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R # overrides "last-window"
# change "last-window" binding to vim's "#"
bind -T prefix \# last-window
# start tmux in an interactive-shell intead of a login-shell
set -g default-command "${SHELL}"
# configuration for terminal emulator (see $TERM variable and infocmp)
set -ga terminal-overrides ",xterm-termite:Tc" # termite: enable truecolor (24bit)