-
Notifications
You must be signed in to change notification settings - Fork 5
/
.tmux.conf
56 lines (43 loc) · 2.32 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
set-option -g prefix C-a
bind C-a send-prefix
# Make `Ctrl+A R` reload the config file
unbind r
bind r source-file ~/.tmux.conf
# Fix issues on OSX with user permissions
set-option -g default-command 'reattach-to-user-namespace -l $SHELL'
## switch panes using Alt-arrow without prefix, using vim-tmux-navigator to make vim and tmux play nicely
# Vim Keys
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
# bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l"
# Arrow Keys
bind -n C-Left run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-Right run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
bind -n C-Up run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-Down run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
bind Left select-window -t :-
bind Right select-window -t :+
# Enable mouse mode (tmux 2.1 and above)
set -g mouse on
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# boost history
set -g history-limit 20000
# Set escape timeout to zero
set -s escape-time 0
# Set default terminal color thingy
set-option -g default-terminal "xterm-256color"
set-option -sa terminal-overrides ",xterm*:Tc"
# tmuxline.vim Snapshot if exists
if-shell "test -f ~/.config/tmux/tmuxline.vim.snapshot" "source ~/.config/tmux/tmuxline.vim.snapshot"
# Launch a small gitsh window at the bottom
# bind-key g split-window -v -p 20 gitsh
bind-key g split-window -v -p 20 gitsh
bind-key a run-shell "~/bin/fuzzy_muxed"
# Neovim told me to do this :shrug:
set-option -g focus-events on