-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
41 lines (32 loc) · 1.39 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
set -g mouse on
set -g history-limit 6000
set-option -sg escape-time 10
set -g default-terminal "tmux-256color"
# rebind prefix from 'C-b' to 'C-w'
unbind C-b
set-option -g prefix C-w
bind-key C-w send-prefix
# set tmux to Vi mode
set-window-option -g mode-keys vi
# split panes with |,-,_
bind | split-window -h
bind - split-window -v
bind _ split-window -v
unbind '"'
unbind %
# reload config
bind r source-file ~/.tmux.conf
bind-key h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-w h) || tmux select-pane -L"
bind-key j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-w j) || tmux select-pane -D"
bind-key k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-w k) || tmux select-pane -U"
bind-key l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-w l) || tmux select-pane -R"
# bind-key \ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-w \) || tmux select-pane -l"
# enter copy mode
bind K copy-mode
# yank
# bind-key -t vi-copy 'v' begin-selection
# bind-key -t vi-copy 'y' copy-selection
#colors
#set -g default-terminal "screen-256colors"
# copy and paste linux
bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -i -f -selection primary | xclip -i -selection clipboard"