-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
55 lines (47 loc) · 2.11 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
## General
set -g history-limit 10000
## Display
set -g base-index 1 # start windows numbering at 1
setw -g pane-base-index 1 # make pane numbering consistent with windows
setw -g automatic-rename off # rename window to reflect current program
set -g renumber-windows on # renumber windows when a window is closed
set -sg escape-time 0 # No delay for escape key press
set -g set-titles on # set terminal title
set -g display-panes-time 800 # slightly longer pane indicators display time
set -g display-time 1000 # slightly longer status messages display time
## Keybindings
# Pane management
bind C-c new-session # create session
bind C-f command-prompt -p find-session 'switch-client -t %%' # find session
# Pane navigation
bind -r h select-pane -L # move left
bind -r j select-pane -D # move down
bind -r k select-pane -U # move up
bind -r l select-pane -R # move right
bind > swap-pane -D # swap current pane with the next one
bind < swap-pane -U # swap current pane with the previous one
bind + run 'cut -c3- ~/.tmux.conf | sh -s _maximize_pane "#{session_name}" #D' # maximize current pane
# Pane resizing
bind -r H resize-pane -L 2
bind -r J resize-pane -D 2
bind -r K resize-pane -U 2
bind -r L resize-pane -R 2
# Window navigation
unbind n
unbind p
bind - split-window -v # split current window horizontally
bind _ split-window -h # split current window vertically
bind -r C-h previous-window # select previous window
bind -r C-l next-window # select next window
bind Tab last-window # move to last active window
# Copy, viewmodes and mouse
bind m run "cut -c3- ~/.tmux.conf | sh -s _toggle_mouse" # toggle mouse
bind Enter copy-mode # copy mode
bind U run "cut -c3- ~/.tmux.conf | sh -s _urlview #{pane_id}" # enter url view mode
if -b 'command -v reattach-to-user-namespace > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | reattach-to-user-namespace pbcopy"' # copy to Mac OSX clipboard
# Reload tmux config
unbind r
bind r source-file ~/.tmux.conf \; display '~/.tmux.conf sourced'
# Apperance
set -g default-terminal "xterm-256color"
source-file $HOME/.config/tmux/tmux.theme