-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
103 lines (79 loc) · 2.98 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
95
96
97
98
99
100
101
102
103
set -g default-terminal "screen-256color"
#Prefix is Ctrl-a
set -g prefix C-a
bind C-a send-prefix
unbind C-b
set -sg escape-time 1
# set -s escape-time 0
set -g base-index 1
setw -g pane-base-index 1
#Mouse works as expected
setw -g mode-mouse on
set -g mouse-select-pane on
set -g mouse-resize-pane on
set -g mouse-select-window on
setw -g monitor-activity on
set -g visual-activity on
set -g mode-keys vi
set -g history-limit 50000
# y and p as in vim
bind Escape copy-mode
# unbind p
# bind p paste-buffer
bind -t vi-copy 'v' begin-selection
bind -t vi-copy 'y' copy-selection
bind -t vi-copy 'Space' halfpage-down
bind -t vi-copy 'Bspace' halfpage-up
# extra commands for interacting with the ICCCM clipboard
bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"
bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
# easy-to-remember split pane commands
# bind | split-window -h
# bind - split-window -v
# unbind '"'
# unbind %
bind-key C-o last-window
bind-key o last-window
# unbind C-h
# unbind C-l
unbind C-o
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# bind-key -r C-h select-window -t :-
# bind-key -r C-l select-window -t :+
# copy to osx
#set-option -g default-command "reattach-to-user-namespace -l zsh"
#bind ^y run-shell "reattach-to-user-namespace -l zsh -c 'tmux showb | pbcopy'"
# quick pane cycling
#unbind ^a
#bind ^a select-pane -t :.+
#Color
# Fix the copy and paste
set-option -ga terminal-override ',rxvt-uni*:XT:Ms=\E]52;%p1%s;%p2%s\007'
# bind C-c run "tmux save-buffer - | xclip -i -selection clipboard"
# bind C-v run "tmux set-buffer -- \"$(xclip -o -selection clipboard)\"; tmux paste-buffer"
#
# set-option -g status on
# set-option -g status-interval 2
# set-option -g status-utf8 on
# # set-option -g status-justify "centre"
# set-option -g status-left-length 60
# set-option -g status-right-length 60
#
# set -g status-fg white
# set -g status-bg black
# Set status bar
set -g status-bg colour234
set -g status-fg white
set -g status-left '#[fg=green]#S'
set -g status-right '#[fg=yellow]%R'
set -g status-right-length 40
# Smart pane switching with awareness of vim splits
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|n?vim?)(diff)?$' && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|n?vim?)(diff)?$' && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|n?vim?)(diff)?$' && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|n?vim?)(diff)?$' && tmux send-keys C-l) || tmux select-pane -R"
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|n?vim?)(diff)?$' && tmux send-keys 'C-\\') || tmux select-pane -l"
source-file ~/.vim/tmuxline.tmux.conf