-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
53 lines (40 loc) · 1.89 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
set-option -g default-terminal "screen-256color"
set-option -g default-shell /bin/zsh
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# split panes with - and |
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
unbind '"'
unbind %
bind r source-file ~/.tmux.conf
# switch panes using Alt-arrow without prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# set current window to 70 and split
bind '"' split-window -h -l 120 -c "#{pane_current_path}"
# No delay for escape key press
set -sg escape-time 0
setw -g automatic-rename on # rename window to reflect current program
set -g renumber-windows on # renumber windows when a window is closed
set -g set-titles on # set terminal title
set -g set-titles-string '#h ❐ #S ● #I #W'
source-file "${HOME}/.tmux-themepack/powerline/block/cyan.tmuxtheme"
# tmux vim pane navigation
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
# for dev
set -g default-command "reattach-to-user-namespace -l zsh"
run-shell ~/clone/path/yank.tmux
# Use v to trigger selection
bind-key -T copy-mode-vi v send-keys -X begin-selection
# Use y to yank current selection
#bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
bind -T copy-mode-vi y send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind P paste-buffer
set-window-option -g mode-keys vi