-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
131 lines (96 loc) · 3.23 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
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
set-window-option -g mode-keys vi
###########################################################################
# General options
# Default termtype. If the rcfile sets $TERM, that overrides this value.
set -g default-terminal screen-256color
setw -g utf8 on
# Ring the bell if any background window rang a bell
set -g bell-action any
# scrollback size
#set -g history-limit 10000
###########################################################################
# Mouse mode
set -g mode-mouse on
set -g mouse-resize-pane on
set -g mouse-select-pane on
set -g mouse-select-window on
# Toggle mouse on
bind m \
set -g mode-mouse on \;\
set -g mouse-resize-pane on \;\
set -g mouse-select-pane on \;\
set -g mouse-select-window on \;\
display 'Mouse: ON'
# Toggle mouse off
bind M \
set -g mode-mouse off \;\
set -g mouse-resize-pane off \;\
set -g mouse-select-pane off \;\
set -g mouse-select-window off \;\
display 'Mouse: OFF'
###########################################################################
# General keymap
# Change the splitting commands, these are more intuitive
unbind %
bind | split-window -h
bind _ split-window -v
# Pipe the current pane to a log file with Shift-H - Press Shift-H again to stop.
bind-key H pipe-pane -o "cat >>$HOME/#W-tmux.log" \; display-message "Toggled logging to $HOME/#W-tmux.log"
# Sync panes - send what you're typing to other panes.
bind C-s set-window-option synchronize-panes
# Window numbering starts at 1
set -g base-index 1
set-window-option -g pane-base-index 1
# Redraw the client (if interrupted by wall, etc)
bind R refresh-client
# Force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf
# VI-like copying
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
# Change the prefix from ctrl+b to `
unbind-key C-b
#set -g prefix 'C-a'
# Caps lock + space? M-Space
set -g prefix `
bind-key ` send-prefix
###########################################################################
# Panel management / navigation
# Move around panes with j and k, a bit like vim
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# resize panes like vim
bind < resize-pane -L 10
bind > resize-pane -R 10
bind - resize-pane -D 10
bind + resize-pane -U 10
# Quick pane cycling
unbind ^A
bind ^A select-pane -t :.+
###########################################################################
# Window management / navigation
# Cursors for windows
bind Left previous-window
bind Right next-window
###########################################################################
# Copy-paste for OS X
# enable copy-paste http://goo.gl/DN82E
# enable RubyMotion http://goo.gl/WDlCy
# set -g default-command "reattach-to-user-namespace -l zsh"
###########################################################################
# Color scheme
# Soften status bar color from harsh green to light gray
#set -g status-bg '#666666'
#set -g status-fg '#aaaaaa'
#source-file ~/.tmux/color-scheme/cobalt.conf
#source-file ~/.tmux/color-scheme/tango_dark.conf
#source-file ~/.tmux/color-scheme/solarized_light.conf
source-file ~/.tmux/color-scheme/solarized_dark.conf
set -sg escape-time 0