aboutsummaryrefslogtreecommitdiff
path: root/.tmux.conf
blob: b9e699aabff75f578513a445ab62e46049777808 (plain)
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
# general

unbind C-b
unbind C-q

unbind C-s
set -g prefix 'C-s'
bind 'C-s' send-prefix -2
set -sg escape-time 0

set -g default-terminal "xterm-256color"
bind r source-file ~/.tmux.conf \; display '~/.tmux.conf sourced'
set -g mouse on
set-option -g allow-rename off

# vim mode
set-window-option -g mode-keys vi

# navigation

bind n new-session
bind f command-prompt -p find-session: 'switch-client -t %%'

bind | split-window -h -c '#{pane_current_path}'
bind - split-window -v -c '#{pane_current_path}'
unbind '"'
unbind %

## swtich between pane
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R

## resize the pane
bind H resize-pane -L 5
bind L resize-pane -R 5
bind K resize-pane -U 5
bind J resize-pane -D 5

# copy and paste like vim
 bind -T copy-mode-vi 'v' send -X begin-selection
 bind -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"

if-shell 'test -f "$HOME/.local/.tmux.conf"' 'source ~/.local/.tmux.conf'