-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtmux.conf
69 lines (52 loc) · 1.95 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
# allows for mac commands to work
set-option -g default-command "reattach-to-user-namespace -l zsh"
# remap prefix to Control + a
unbind C-b
set -g prefix C-a
# send the prefix to client inside window
bind-key -n C-q send-prefix
# Vim-like keybindings
# moving between panes with vim movement keys
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# moving between windows with vim movement keys
# currently conflicts with my spaces hotkeys
# bind -r C-h select-window -t :-
# bind -r C-l select-window -t :+
# resize panes with vim movement keys
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# prevent auto renaming of windows
set-option -g allow-rename off
# allow for easy reloading
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
# easier scroll mode with vi
# bind -r ";" copy-mode
### Color Stuff
# status line
set -g status-justify left
set -g status-style fg=yellow,bg=default
# messaging
set -g message-style fg=brightred,bg=default
# window status
setw -g window-status-format "#[fg=black]#[bg=blue] #I #[bg=brightblue]#[fg=black] #W "
setw -g window-status-current-format "#[bg=brightred]#[fg=black] #I #[fg=black]#[bg=brightblue] #W "
setw -g window-status-style reverse
# tmux clock
set -g clock-mode-colour blue
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Setup 'v' to begin selection as in Vim
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
#Update default binding of `Enter` to also use copy-pipe
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# New/split window with default path set to last path
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"