forked from freitagbr/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtmux.conf
More file actions
70 lines (55 loc) · 1.6 KB
/
tmux.conf
File metadata and controls
70 lines (55 loc) · 1.6 KB
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
# tmux.conf
# Michael Metcalf, 2016
# Inspired by Ham Vocke, Brandon Freitag
# http://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/
# https://robots.thoughtbot.com/how-to-copy-and-paste-with-tmux-on-mac-os-x
# set-option -g default-command "reattach-to-user-namespace -l bash"
# colors
set -g status-bg colour250
set -g status off
set -g pane-active-border-style fg=blue
set -g pane-border-style fg=colour255
set -wg mode-style bg=colour250,fg=blue
# remap C-b to C-s
unbind C-b
set-option -g prefix M-s
bind-key M-s send-prefix
# split panes with - and =
unbind '"'
unbind %
unbind -
unbind =
bind = split-window -h
bind - split-window -v
# closing windows and panes
unbind .
unbind &
bind -T prefix / confirm-before -p "kill-window #W? (y/n)" kill-window
bind -T prefix . confirm-before -p "kill-pane #P? (y/n)" kill-pane
# remapping for new, last and next windows
unbind n
unbind m
bind -T prefix m next-window
bind -T prefix n new-window
# reload tmux.conf
bind r source-file ~/.tmux.conf
# bind e new-window -n '~/.tmux.conf' "sh -c 'nvim ~/.tmux.conf && tmux source ~/.tmux.conf'"
bind e run-shell "sh -c 'code --wait ~/.tmux.conf && tmux source ~/.tmux.conf'"
# switch panes with { }
#bind -n M-S-[ last-pane
#bind -n M-S-] select-pane -t :.+
# switch panes with alt-arrow
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
set -g mouse on
# accomodate vim keybindings
unbind C-Left
unbind C-Right
unbind C-Up
unbind C-Down
set-window-option -g xterm-keys on
# allow vim to exit modes quickly
set escape-time 0