-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
40 lines (32 loc) · 1.32 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
# https://github.com/tmux/tmux/wiki/Getting-Started#changing-the-prefix-key
set-option -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix
# Entering copy-mode easily
bind-key M-a copy-mode
setw -g mode-keys vi
# Making Copy-Paste More Intuitive (https://dev.to/iggredible/the-easy-way-to-copy-text-in-tmux-319g)
bind -T copy-mode-vi v send -X begin-selection
# Mac specific:
#bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
#bind p paste-buffer
#bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
# Linux specific:
bind-key -T copy-mode-vi y send -X copy-selection-and-cancel
bind p paste-buffer
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel
# To do: Copy to system clipboard
# ...
bind-key x kill-pane
set-option -g mouse on
bind-key v split-window -h
bind-key s split-window -v
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# Tweak escape-time to make nvim <Esc> more responsive when in terminal mode
# See https://vi.stackexchange.com/a/30801
set -sg escape-time 10
if-shell -b 'test $(uname) = "Linux"' 'bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"'
if-shell -b 'test $(uname) = "Darwin"' 'bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"'