forked from wmayner/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf.symlink
110 lines (91 loc) · 3.44 KB
/
tmux.conf.symlink
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
101
102
103
104
105
106
107
108
109
110
# Modeline {{
# vim: set foldmarker={{,}} foldlevel=0 foldmethod=marker :
# }}
# General / Misc {{
# bind <prefix> to Control + a (doesn't unbind default)
set -g prefix C-a
# sends the <prefix> generated by Ctrl + a to any tmux process running
# inside the current tmux process. turtles all the way down.
bind C-a send-prefix
# Force reload of this file. Avoids need to restart session.
bind r source-file ~/.tmux.conf
# automatically renumber windows with consecutive integers
set-option -g renumber-windows on
# start window numbering at 1
set -g base-index 1
# Easier window creation
bind-key C command-prompt -p "Name of new window: " "new-window -n '%%'"
# Easier window deletion. Won't prompt for confirmation.
bind-key x kill-pane
# Using the mouse enters copy mode (leave copy mode using 'q').
set -g mode-mouse on
# }}
# UI {{
# Title bar {{
#allow us to control tmux tile bar in os x
set-option -g set-titles on
# make the title something meaningful (rather than just 'tmux')
set-option -g set-titles-string "[#S] #W {#H}"
# }}
# Status bar {{
# Force tmux to use 256 colors. This is needed for vim to display colors properly in tmux
set -g default-terminal "xterm-256color"
# default options for whole status bar
set-option -g status-bg colour234
set-option -g status-fg colour11
# overwrite default options for left side, display sesion name
set-window-option -g status-left " #S "
set-window-option -g status-left-fg yellow
set-window-option -g status-left-bg colour234
# overwrite default options for right side, display user & host names
set-window-option -g status-right "#[fg=yellow]#(whoami)#[fg=white]:#[fg=blue]#(hostname -s)"
set-window-option -g status-right-bg colour234
# format window status
set-window-option -g window-status-format " #I: #W "
# don't let tmux overwrite our window names
set-window-option -g allow-rename off
# overwrite default for active window
# unique colors help it stand out.
set-window-option -g window-status-current-format " #I: #W "
set-window-option -g window-status-current-fg green
set-window-option -g window-status-current-bg black
# }}
# }}
# VIM STYLE KEYBINDINGS {{
# use vim keybindings in tmux copy and choice modes
set-window-option -g mode-keys vi
# use vim keybindings in status line (ex: at command prompt).
set-option -g status-keys vi
# -t means this binding is applicable only when in normal mode
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
# Ctrl+a, p pastes contents of buffer
bind p paste-buffer
# Reduce delay before <Esc> takes effect
set -sg escape-time 0
# }}
# PANE AND WINDOW MANAGEMENT {{
bind | split-window -h
bind - split-window -v
# <Prefix>+Vim style to change panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# <Alt>+arrow to change panes
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
# ctrl + (double tap a) cycles to next pane
bind ^A select-pane -t :.+
# Shif+arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window
# }}
# TODOS {{
# investigate copy paste settings:
# - http://www.drbunsen.org/the-text-triumvirate/
# - https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard
# investigate tmuxinator
# }}