-
Notifications
You must be signed in to change notification settings - Fork 152
/
tmux.conf
68 lines (54 loc) · 2.27 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
# vim:ft=conf:
# Ctrl-a as prefix instead of Ctrl-b
set -g prefix C-a
unbind C-b
# have `C-a C-a` send C-a keypress to the current window
bind C-a send-prefix
# Smart pane switching with awareness of vim splits
bind -n C-k run-shell '#{d:config_files}/bin/tmux-vim-select-pane -U'
bind -n C-j run-shell '#{d:config_files}/bin/tmux-vim-select-pane -D'
bind -n C-h run-shell '#{d:config_files}/bin/tmux-vim-select-pane -L'
bind -n C-l run-shell '#{d:config_files}/bin/tmux-vim-select-pane -R'
bind -n "C-\\" run-shell '#{d:config_files}/bin/tmux-vim-select-pane -l'
# Have new windows and panes open in the current directory
bind '"' split-window -c '#{pane_current_path}'
bind % split-window -c '#{pane_current_path}' -h
bind c new-window -c '#{pane_current_path}'
# Copy to clipboard
bind-key -Tcopy-mode-vi 'v' send -X begin-selection
bind-key -Tcopy-mode-vi 'y' send -X copy-selection
# switch to a session that start with the given name
bind S command-prompt -p session: "run-shell '#{d:config_files}/bin/tmux-switch-session \"%%\"'"
bind s choose-tree -sN
bind m command-prompt -p man: "split-window -h 'man %1'"
# source this file after changes
bind R source-file ~/.tmux.conf
# enable for iTerm (Terminal.app doesn't have mouse support)
set -g mouse on
# Faster escape sequences (default is 500ms).
# This helps when exiting insert mode in Vim: http://superuser.com/a/252717/65504
set -s escape-time 50
# start numbering windows from 1 instead of zero
set -g base-index 1
# syntax highlighting in Vim
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ",xterm-256color:Tc"
# disable programs changing window names via terminal escape sequence
set-window-option -g allow-rename off
# status bar
set -g status-fg colour8
set -g status-bg colour234
# current session
set -g status-left ' #S '
set -g status-left-length 15
# set -g status-left-fg colour229
# set -g status-left-bg colour166
# window list
set -g window-status-format "#[fg=colour8] #I #[fg=colour231]#W#[fg=colour166]#F "
set -g window-status-current-format "#[fg=colour117,bg=colour31] #I #[fg=colour231]#W#[fg=colour234]#F "
set -g window-status-separator ""
# battery status
set -g status-right ' #(battery) '
set -g status-interval 15
# disable possibly set visual editor
set-environment -gu GEM_EDITOR