-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
72 lines (53 loc) · 2.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
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
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com/user/plugin'
# set -g @plugin 'git@bitbucket.com/user/plugin'
#set -g @plugin 'nhdaly/tmux-better-mouse-mode'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '/usr/share/tmux-plugin-manager/tpm'
bind r source-file ~/.tmux.conf \; display "source-file reloaded!"
set -g mouse on
set-window-option -g mode-keys vi
set -g prefix C-b
#set -g @scroll-down-exit-copy-mode "on"
#set -g @scroll-without-changing-pane "off"
#set -g @scroll-in-moused-over-pane "on"
# to enable mouse scroll
#set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# Allow xterm titles in terminal window, terminal scrolling with scrollbar, and setting overrides of C-Up, C-Down, C-Left, C-Right
#set -g terminal-overrides "xterm*:XT:smcup@:rmcup@:kUP5=\eOA:kDN5=\eOB:kLFT5=\eOD:kRIT5=\eOC"
# Scroll History
set -g history-limit 32767
# Set ability to capture on start and restore on exit window data when running an application
setw -g alternate-screen on
# Lower escape timing from 500ms to 50ms for quicker response to scroll-buffer access.
set -s escape-time 50
bind \ split-window -h -c '#{pane_current_path}' # Split panes horizontal
bind - split-window -v -c '#{pane_current_path}' # Split panes vertically
# VIM Style
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# set first window to index 1 (not 0) to map more to the keyboard layout
set-option -g renumber-windows on
set -g base-index 1
setw -g pane-base-index 1
## Clipboard integration
# ctrl+c to send to clipboard
#unbind C-c
#bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"
# ctrl+v to paste from clipboard
#unbind C-v
#bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
#unbind -n -Tcopy-mode-vi MouseDown1Pane
#bind -Tcopy-mode-vi MouseDown1Pane select-pane \; send -X copy-selection-and-cancel
# Middle click to paste from the clipboard
#unbind -n -Tcopy-mode-vi MouseDown2Pane
#bind -Tcopy-mode-vi MouseDown2Pane paste-buffer
# Selection with mouse should copy to clipboard right away, in addition to the default action.
unbind -n -Tcopy-mode-vi MouseDragEnd1Pane
bind -Tcopy-mode-vi MouseDragEnd1Pane select-pane\; send -X copy-selection-and-cancel \; run "tmux save-buffer - > /dev/null" # | xclip -i -sel clipboard > /dev/null"