-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
97 lines (65 loc) · 1.95 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
97
##################################################
#
# PLUGINS
#
##################################################
# set -g @plugin 'tmux-plugins/tpm'
# set -g @plugin 'tmux-plugins/tmux-sensible'
if-shell 'test -f /usr/share/powerline/bindings/tmux/powerline.conf' 'source-file /usr/share/powerline/bindings/tmux/powerline.conf'
##################################################
#
# BASIC SETTINGS
#
##################################################
# reload config file
bind r source-file ~/.tmux.conf
# start counting at 1
set -g base-index 1
# neovim config
set-option -g default-terminal "tmux-256color"
set-option -sg escape-time 10
set-option -g focus-events on
set-option -ga terminal-overrides ',*256col*:Tc'
# remap prefix from 'C-b' to 'Alt-a'
unbind C-b
set-option -g prefix M-a
bind-key M-a send-prefix
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
# Enable mouse control
set -g mouse on
set -g mode-keys vi
##################################################
#
# NAVIGATION
#
##################################################
# switch with alt and vim keys
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
# split windows like vim
# bind-key v split-window -h
# bind-key s split-window -v
bind -n M-v split-window -h
bind -n M-s split-window -v
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
bind-key -T copy-mode-vi p run "xclip -o -sel clip | tmux load-buffer - ; tmux paste-buffer"
# Resize pane
bind -n M-K resize-pane -U 5
bind -n M-J resize-pane -D 5
bind -n M-H resize-pane -L 5
bind -n M-L resize-pane -R 5
##################################################
#
# SESSIONS
#
##################################################
# new -n ranger ranger
# neww -n vim vim
# neww -n bash
# Initialize TMUX plugin manager
# run -b '~/.tmux/plugins/tpm/tpm'