@@ -24,52 +24,60 @@ Tested and working on Linux, OSX and Cygwin.
24
24
25
25
### Options
26
26
27
- # address vim mode switching delay (http://superuser.com/a/252717/65504)
28
- set -s escape-time 0
27
+ ``` tmux
28
+ # Address vim mode switching delay (http://superuser.com/a/252717/65504)
29
+ set -s escape-time 0
29
30
30
- # increase scrollback buffer size
31
- set -g history-limit 50000
31
+ # Increase scrollback buffer size from 2000 to 50000 lines
32
+ set -g history-limit 50000
32
33
33
- # tmux messages are displayed for 4 seconds
34
- set -g display-time 4000
34
+ # Increase tmux messages display duration from 750ms to 4s
35
+ set -g display-time 4000
35
36
36
- # refresh 'status-left' and 'status-right' more often
37
- set -g status-interval 5
37
+ # Refresh 'status-left' and 'status-right' more often, from every 15s to 5s
38
+ set -g status-interval 5
38
39
39
- # set only on OS X where it's required
40
- set -g default-command "reattach-to-user-namespace -l $SHELL"
40
+ # (OS X) Fix pbcopy/pbpaste for old tmux versions (pre 2.6)
41
+ set -g default-command " reattach-to-user-namespace -l $SHELL "
41
42
42
- # upgrade $TERM
43
- set -g default-terminal "screen-256color"
43
+ # Upgrade $TERM
44
+ set -g default-terminal " screen-256color"
44
45
45
- # emacs key bindings in tmux command prompt (prefix + :) are better than
46
- # vi keys, even for vim users
47
- set -g status-keys emacs
46
+ # Emacs key bindings in tmux command prompt (prefix + :) are better than
47
+ # vi keys, even for vim users
48
+ set -g status-keys emacs
48
49
49
- # focus events enabled for terminals that support them
50
- set -g focus-events on
50
+ # Focus events enabled for terminals that support them
51
+ set -g focus-events on
51
52
52
- # super useful when using "grouped sessions" and multi-monitor setup
53
- setw -g aggressive-resize on
53
+ # Super useful when using "grouped sessions" and multi-monitor setup
54
+ setw -g aggressive-resize on
55
+ ```
54
56
55
57
### Key bindings
56
58
57
- # easier and faster switching between next/prev window
58
- bind C-p previous-window
59
- bind C-n next-window
59
+ ``` tmux
60
+ # Easier and faster switching between next/prev window
61
+ bind C-p previous-window
62
+ bind C-n next-window
63
+ ```
60
64
61
65
Above bindings enhance the default ` prefix + p ` and ` prefix + n ` bindings by
62
66
allowing you to hold ` Ctrl ` and repeat ` a + p ` /` a + n ` (if your prefix is
63
67
` C-a ` ), which is a lot quicker.
64
68
65
- # source .tmux.conf as suggested in `man tmux`
66
- bind R source-file '~/.tmux.conf'
69
+ ``` tmux
70
+ # Source .tmux.conf as suggested in `man tmux`
71
+ bind R source-file ' ~/.tmux.conf'
72
+ ```
67
73
68
74
"Adaptable" key bindings that build upon your ` prefix ` value:
69
75
70
- # if prefix is 'C-a'
71
- bind C-a send-prefix
72
- bind a last-window
76
+ ``` tmux
77
+ # If prefix is 'C-a'
78
+ bind C-a send-prefix
79
+ bind a last-window
80
+ ```
73
81
74
82
If prefix is ` C-b ` , above keys will be ` C-b ` and ` b ` .<br />
75
83
If prefix is ` C-z ` , above keys will be ` C-z ` and ` z ` ... you get the idea.
@@ -78,7 +86,9 @@ If prefix is `C-z`, above keys will be `C-z` and `z`... you get the idea.
78
86
79
87
Add plugin to the list of TPM plugins in ` .tmux.conf ` :
80
88
81
- set -g @plugin 'tmux-plugins/tmux-sensible'
89
+ ``` tmux
90
+ set -g @plugin ' tmux-plugins/tmux-sensible'
91
+ ```
82
92
83
93
Hit ` prefix + I ` to fetch the plugin and source it. That's it!
84
94
@@ -90,7 +100,9 @@ Clone the repo:
90
100
91
101
Add this line to the bottom of ` .tmux.conf ` :
92
102
93
- run-shell ~/clone/path/sensible.tmux
103
+ ``` tmux
104
+ run-shell ~ /clone/path/sensible.tmux
105
+ ```
94
106
95
107
Reload TMUX environment with ` $ tmux source-file ~/.tmux.conf ` , and that's it.
96
108
0 commit comments