-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
82 lines (58 loc) · 2.36 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
# Configure true colors
# set -g default-terminal "screen-256color"
set -g default-terminal "xterm-256color"
# this is will disbale the exit on destroy a session
set-option -g detach-on-destroy off
# set for nightfly theme
set -ga terminal-overrides ",xterm-256color:Tc"
# configure defaut shell
set -g default-shell $SHELL
# Change default tmux prefix to "Ctrl+a"
# set -g prefix C-a
# unbind C-b
# bind-key C-a send-prefix
# bind Command p to paste buffer
# bind C-p paste-buffer
# Chagne keybinds fro spliting windows
unbind %
bind | split-window -h
unbind '"'
bind - split-window -v
# set base index to 1
set -g base-index 1
# renumber all windows when any window is deleted
set -g renumber-windows on
# Add keybinds for easily refreshing tmux configuration
unbind r
bind r source-file ~/.tmux.conf
# Add keybinds for easily resizing tmux panes
bind -r j resize-pane -D 5
bind -r k resize-pane -U 5
bind -r l resize-pane -R 5
bind -r h resize-pane -L 5
# Add keybinds for maximizing and minimizing tmux pane
bind -r m resize-pane -Z
# Enable the mouse in tmux
set -g mouse on
# Configure vim movements for tmux's copy mode
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi v send-keys -X begin-selection # start selecting text with "v"
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -n -selection clipboard' # copy text with "y"
unbind -T copy-mode-vi MouseDragEnd1Pane # don't exit copy mode after dragging with mouse
# remove delay for existing insert mode with ESC in Neovim
set -sg escape-time 10
# enabling the focus-event
set-option -g focus-events on
# adding tmp configuration
# tpm plugin
set -g @plugin 'tmux-plugins/tpm'
# list of tmux plugins
set -g @plugin 'christoomey/vim-tmux-navigator' # for navigating panes and vim/nvim with Ctrl-hjkl
set -g @plugin 'jimeh/tmux-themepack' # to configure tmux theme
set -g @plugin 'tmux-plugins/tmux-resurrect' # persist tmux sessions after computer restart
set -g @plugin 'tmux-plugins/tmux-continuum' # automatically saves sessions for you every 15 minutes
set -g @themepack 'powerline/default/cyan' # use this theme for tmux
set -g @resurrect-capture-pane-contents 'on' # allow tmux-ressurect to capture pane contents
set -g @continuum-restore 'on' # enable tmux-continuum functionality
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'