/
.tmux.conf
100 lines (77 loc) 路 2.84 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
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# reload config file (change file location to your the tmux.conf you want to use)
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
# Enable mouse control (clickable windows, panes, resizable panes)
set -g mouse on
# Use mouse for scrolling panes
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e'"
# Open new windows to current path
bind c new-window -c "#{pane_current_path}"
bind '-' split-window -c "#{pane_current_path}"
bind | split-window -h -c "#{pane_current_path}"
set-option -g default-shell /bin/zsh
set -g default-terminal 'screen-256color'
# Disable auto-renaming of tmux windows once named
set-option -g allow-rename off
# Pop the tmux bar at the top
# set-option -g status-position bottom
# set -g status-justify left # left status
# Vi Copy paste
bind-key -T copy-mode-vi WheelUpPane send -X scroll-up
bind-key -T copy-mode-vi WheelDownPane send -X scroll-down
# Set tmux to Vi mode
setw -g mode-keys vi
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi 'C-v' send -X begin-selection \; send -X rectangle-toggle
# Nice resizing
bind j resize-pane -D 10
bind k resize-pane -U 10
bind l resize-pane -L 10
bind h resize-pane -R 10
# Start windows and panes at base 1
set -g base-index 1
set -g pane-base-index 1
# Use Ctrl-Shift-Left and Right to move windows around
bind-key -n C-S-Left swap-window -t -1
bind-key -n C-S-Right swap-window -t +1
# Set title for iTerm2
set-option -g set-titles on
set -g set-titles-string "#I #W"
# Time to pass escape through to vim
set escape-time 10
# Try to fix re-drawing lag
set -g focus-events off
# Solarized colorscheme
set -g @colors-solarized 'dark'
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'seebi/tmux-colors-solarized'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'schasse/tmux-jump'
set -g @plugin 'wfxr/tmux-power'
set -g @plugin 'wfxr/tmux-fzf-url'
set -g @tmux_power_theme '#586e75'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com/user/plugin'
# set -g @plugin 'git@bitbucket.com/user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'