-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
executable file
·47 lines (38 loc) · 1.45 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
#https://gist.github.com/MohamedAlaa/2961058
# remap prefix to Control + w
unbind C-b
set-option -g prefix C-w
bind C-w send-prefix
#vi-like bindings
setw -g mode-keys vi
# escape delay
set -sg escape-time 0
#vim-like copy
# send-prefix,Escape # enter copy mode
# move cursor to the start or end of the desired text string
# v # to activate highlighting
# move cursor to cover the requisite string
# y # to capture the string
# q # exit copy mode
# send-prefix,p # put/paste the text in the desired location
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind-key -Tcopy-mode-vi 'v' send -X begin-selection
bind-key -Tcopy-mode-vi 'y' send -X copy-pipe-and-cancel "xclip -i -sel c"
#resize pane with mouse
bind-key m set-option -g mode-mouse on \; set-option mouse-resize-pane on \; set-option mouse-select-pane on \; set-option mouse-select-window on \; display 'Mouse: On'
bind-key M set-option -g mode-mouse off\; set-option mouse-resize-pane off\; set-option mouse-select-pane off\; set-option mouse-select-window off\; display 'Mouse: Off'
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf
# quick pane cycling
unbind ^A
bind ^A select-pane -t :.+
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
set -g default-terminal "screen-256color"
set-option -g default-command "reattach-to-user-namespace -l zsh"