-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdottmate.conf
More file actions
67 lines (54 loc) · 2 KB
/
dottmate.conf
File metadata and controls
67 lines (54 loc) · 2 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
# My tmate configuration file
# You can reload by running: tmate source-file ~/.tmate.conf
#
# tmate is essentially a wrapper around tmux, so it would be nice to share all
# it's keybindings. However the tmate version has drifted somewhat so
# I no longer source my tmux conf and instead just duplicate the bits
# I need.
# Use ` as the escape key
set -g prefix `
bind-key ` send-prefix
# allow be to switch back
bind p command-prompt -p "Enter prefix:" "set -g prefix %1; bind-key %1 send-prefix; set -g status-right '#[fg=white]TMATE Prefix is %1'"
# Window list and nvaigation
unbind-key '"'
bind-key '"' choose-window
# Navigate between sessions/windows (useful when remoting)
if-shell "tmux -V | grep 2.3" "bind ' ' choose-tree -u" "bind ' ' choose-tree -N -F '#W'"
# split panes and restore
unbind %
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind C-Up resize-pane -U 15
bind C-Down resize-pane -D 15
bind C-Left resize-pane -L 25
bind C-Right resize-pane -R 25
bind % next-layout
# Window creation
bind c new-window -a
bind f new-window -a -n fish! fish
bind C command-prompt -p "Enter command:" "new-window -a -n %1 %1"
# Take me to my editor
bind E new-window -n "Emacs" -t 0 -k "emacsclient -a '' -t"
bind e select-window -t "Emacs"
# Move windows
# Set base-index to 1 (0 is reserved for Emacs)
set -g base-index 1
# auto re-number windows as we close old ones
set -g renumber-windows on
# Emacs key bindings
setw -g mode-keys emacs
# Don't wait too long for another escape sequence
set -g escape-time 0
# Tweak mode line to be more visible
set -g status-left-bg black
set -g status-left "#[fg=green]TMATE#[fg=red]@#h"
# names in the middle
set -g status-justify left
set -g status-bg blue
set -g status-fg yellow
# Remind user of tmate prefix on the right
set -g status-right-bg black
set -g status-right-fg white
set -g status-right-length 60
set -g status-right "#{?client_prefix,#[reverse],}#(tmux show-option -g prefix)#[noreverse] #[fg=white]%a %b %e %H:%M"