-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
43 lines (33 loc) · 1.59 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
source-file ~/.config/gruvbox-dark.tmux.conf
#run-shell ~/.config/yank.tmux
set-option -g prefix M-Space
set-option -g history-limit 20000
# remove vim esc timeout
set-option -g escape-time 0
# force vi hotkeys
set-window-option -g mode-keys vi
# `screen-256color` allows to avoid weechat scrolling bug
# when top 3 lines only are being scrolled
set -g default-terminal screen-256color
# Allow true-color for vim
set -ga terminal-overrides ',*256col*:Tc'
# Copy-paste in vim style
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xsel -i -p && xsel -o -p | xsel -i -b"
# Selection and movement in vim style
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi Space send-keys -X cursor-right
# Make life a bit easier
bind-key -T prefix C-n next-window
bind-key -T prefix M-n next-window
bind-key -T prefix C-p previous-window
bind-key -T prefix M-p previous-window
bind-key -T prefix C-[ copy-mode
bind-key -T prefix M-[ copy-mode
bind-key -T prefix O rotate-window
bind-key -T prefix C-o select-pane -t :.+
bind-key -T prefix M-o select-pane -t :.+
# This is analogue to "prefix-," but it swaps window instead of moving it
bind-key -T prefix m command-prompt -p "(swap-window)" "swap-window -t %1; select-window -t %1"
bind-key -T prefix M-m command-prompt -p "(swap-window)" "swap-window -t %1; select-window -t %1"
# Capture scrollback buffer into a file /tmp/tmux-*timestamp*.log
bind-key -T prefix W command 'capture-pane -S -32768 ; save-buffer /tmp/tmux.log ; delete-buffer ; run-shell "mv /tmp/tmux.log /tmp/tmux-$(date -Iseconds | sed \"s/[^a-zA-Z0-9+]/-/g\").log"'