-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtmux.conf
96 lines (72 loc) · 3.09 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
# References:
# - https://github.com/pivotal/tmux-config/blob/master/tmux.conf
# - http://robots.thoughtbot.com/post/2641409235/a-tmux-crash-course
# Act like Vim
set-window-option -g mode-keys vi
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# Look good
set-option -g default-terminal "screen-256color"
# HAX(ivy): Fixes path issues
# https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard/issues/23#issuecomment-31034789
set-option -g default-shell "/bin/sh"
# Add pbcopy/pbpase support
# See https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard
# FIXME(ivy): Fix $PATH issues from executing zsh in a subshell
# ~/.zshenv and /etc/profile multiple times resulting in a really weird $PATH
#set-option -g default-command "reattach-to-user-namespace -l $SHELL"
set-option -g default-command "which reattach-to-user-namespace &>/dev/null && exec reattach-to-user-namespace -l $SHELL || exec $SHELL"
#set-option -g default-command "reattach-to-user-namespace -l zsh"
# Enable mouse support (works in iTerm)
#set-window-option -g mode-mouse on
#set-option -g mouse-select-pane on
#set-option -g mouse-resize-pane on
#set-option -g mouse-select-window on
# Update terminal and color info in new sessions to allow colorscheme detection
# in vim and various customizations based on terminal program and iTerm profile.
set-option -ga update-environment ' COLORFGBG TERM_PROGRAM'
# Start tab numbering at 1
set -g base-index 1
set -g pane-base-index 1
set-option -g renumber-windows on
# Allow for faster key repetition
set -s escape-time 0
# Disable automatic renaming
set -g automatic-rename off
# -- Theme --------------------------------------------------------------------
## Panes
set -g pane-border-fg black
set -g pane-active-border-fg blue
## Tabs
## Status
set-option -g status-position top
set -g status-fg black
set -g status-bg colour25 #colour145
set -g status-left ' ❐ #S '
set -g status-right ' #(hostname | cut -d "." -f 1) #(date +"%D %l:%M %p")'
set -g window-status-format "#[fg=black,bg=default] #I:#W "
set -g window-status-current-format "#[fg=black,bg=blue] #I:#W "
# -- Keybindings --------------------------------------------------------------
# Remap command prefix to Ctrl-a
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# Force a reload of the config file
unbind r
bind r source-file "$HOME/.tmux.conf"
# Quick pane cycling by tapping Ctrl-a twice
unbind ^a
bind ^a select-pane -t :.+
# Use different keys to split windows vertically and horizontally, keeping the
# working directory of the current pane
bind | split-window -h -c '#{pane_current_path}'
bind - split-window -v -c '#{pane_current_path}'
# SSH to host
bind S command-prompt -p "ssh to:" "new-window -h %1 'ssh %1'"
# Change cursor in Vim to distinguish between insert and command modes
# Use in conjunction with tmux-cursors.vim
# set-option -g terminal-overrides '*88col*:colors=88,*256col*:colors=256,xterm*:XT:Ms=\E]52;%p1%s;%p2%s\007:Cc=\E]12;%p1%s\007:Cr=\E]112\007:Cs=\E]50;CursorShape=%?%p1%{3}%<%t%{0}%e%p1%{2}%-%;%d\007'}
# Use C-a v to pase the tmux buffer
bind v paste-buffer