-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
73 lines (56 loc) · 2.1 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
# Un-comment for OSX.
#set-option -g default-shell /usr/local/bin/bash
# set Ctrl-a as the default prefix key combination
# and unbind C-b to free it up
set -g prefix C-a
unbind C-b
# use send-prefix to pass C-a through to application
bind C-a send-prefix
# enable utf-8
# Option only required on older versions of tmux
# See: https://github.com/tmux/tmux/blob/master/CHANGES#L1075-L1081
# We use a conditional on the tmux version to set it on older versions of tmux
# ref: https://stackoverflow.com/q/35016458/1220089
if-shell -b '[ "$(echo "$TMUX_VERSION < 2.1" | bc)" = 1 ]' " \
set -g utf8
set-window-option -g utf8 on
# make tmux display things in 256 colors
#set -g default-terminal "screen-256color"
# set scrollback history to 10000 (10k)
set -g history-limit 10000
# reduce escapte time
set -s escape-time 0
# Start pane indexing at 1
set -g base-index 1
#Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
# Disable tmux/processes in the window rewriting the window nameo
# https://stackoverflow.com/questions/6041178/keep-the-windows-name-fixed-in-tmux
set-option -g allow-rename off
# Terminal settings
set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 50000
setw -g mode-keys vi
#setw -g mode-mouse on
setw -g monitor-activity on
# Disable italics in tmux. It messes with searching a manpage using less (italicizes text instead of highlighting)
set -ga terminal-overrides ',*:sitm@,ritm@'
# Vim style pane selection
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Use HJKL to resize panes
bind-key -nr M-k resize-pane -U 2
bind-key -nr M-j resize-pane -D 2
bind-key -nr M-h resize-pane -L 2
bind-key -nr M-l resize-pane -R 2
bind r source-file ~/.tmux.conf \; display "Reloaded!"
#setw -g mode-mouse on
#set -g mouse-select-pane on
#set -g mouse-select-window on
# Force new-pane spawn in same CWD -- http://unix.stackexchange.com/questions/12032/create-new-window-with-current-directory-in-tmux
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"