-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
111 lines (87 loc) · 3 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#powerline
#source "$HOME/.local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf"
# remap prefix to C-z
set -g prefix C-x
unbind C-b
bind C-x send-prefix
# mouse scrolling and selection
#set -g mouse on
#mode keys
setw -g mode-keys vi
# 256-color terminal
set -g default-terminal "rxvt-unicode-256color"
# scroll limit
set -g history-limit 100000
# reload config without killing server
bind r source-file ~/.tmux.conf \; display-message " Config reloaded..."
#### Theme (Solarized 256)
source ~/.tmux/tmux-colors-solarized/tmuxcolors-256.conf
##status
set -g status on
set -g status-interval 2
bind-key -n C-B set -g status
# faster response
set-option -sg escape-time 0
# swiching to last window like screen
bind-key C-z last-window
# send C-z-z sends C-z to the shell
bind-key z send-prefix
# xterm keys!
set-window-option -g xterm-keys on
# sane splitting
bind e split-window -h -c '#{pane_current_path}'
bind o split-window -v -c '#{pane_current_path}'
#bind -n C-E split-window -h
#bind -n C-O split-window -v
# nova janela com t/Ctrl-shift-t
bind t new-window -c '#{pane_current_path}'
#bind -n C-T new-window
# nova janela com Ctrl-shift-w
#bind -n C-W kill-window
# switch between windows Ctrl-[pagedown|pageup]
bind -n C-PageDown next-window
bind -n C-PageUp previous-window
# move windows Ctrl-shift-[left|right]
bind-key -n C-S-Left swap-window -t -1
bind-key -n C-S-Right swap-window -t +1
# navigating around panes
#bind x select-pane -t :.+
#bind -n M-right select-pane -R
#bind -n M-left select-pane -L
#bind -n M-up select-pane -U
#bind -n M-down select-pane -D
# Smart pane switching with awareness of vim splits
bind -n M-up run-shell '~/.bin/tmux-vim-select-pane -U'
bind -n M-down run-shell '~/.bin/tmux-vim-select-pane -D'
bind -n M-left run-shell '~/.bin/tmux-vim-select-pane -L'
bind -n M-right run-shell '~/.bin/tmux-vim-select-pane -R'
#bind -n "C-\\" run-shell 'tmux-vim-select-pane -l'
# vi keys
set-option -g status-keys vi
#setw -g mode-keys vi
# usar Escape para entrar no modo copia,
# v para selecionar, p para colar,
# = para lista de buffer
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
##CLIPBOARD selection integration
##Requires prefix key before the command key
#Copy tmux paste buffer to CLIPBOARD
bind -n C-y run "tmux show-buffer | xclip -i -selection clipboard"
#Copy CLIPBOARD to tmux paste buffer and paste tmux paste buffer
#bind -n C-p run "tmux set-buffer -- \"$(xclip -o -selection clipboard)\"; tmux paste-buffer"
# TPM Plugins
#set -g @plugin 'tmux-plugins/tmux-resurrect'
#set -g @plugin 'tmux-plugins/tmux-continuum'
set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.tmux/plugins/'
set -g @continuum-restore 'on'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run-shell '~/.tmux/plugins/tpm/tpm'
bind -n M-i send-keys 'sudo pacman -S '
bind -n M-l send-keys 'pacman -Ss '
bind -n M-u send-keys 'sudo pacman -Syu'
bind -n M-Enter send-keys C-a 'sudo ' C-e