43 lines
925 B
Plaintext
43 lines
925 B
Plaintext
|
# go zsh, go
|
||
|
set-option -g default-shell $SHELL
|
||
|
|
||
|
# set utf-8
|
||
|
set-window-option -g utf8 on
|
||
|
set -g status-utf8 on
|
||
|
|
||
|
# look good
|
||
|
set-option -g default-terminal "screen-256color"
|
||
|
|
||
|
# act like GNU screen
|
||
|
unbind C-b
|
||
|
set -g prefix C-a
|
||
|
|
||
|
# set vi bind
|
||
|
set-window-option -g mode-keys vi
|
||
|
|
||
|
# share clipboard
|
||
|
set-option -g default-command "/usr/local/bin/reattach-to-user-namespace -l $SHELL"
|
||
|
|
||
|
# a mouse
|
||
|
set -g mode-mouse on
|
||
|
setw -g mouse-select-window on
|
||
|
setw -g mouse-select-pane on
|
||
|
|
||
|
# act like vim
|
||
|
setw -g mode-keys vi
|
||
|
bind h select-pane -L
|
||
|
bind j select-pane -D
|
||
|
bind k select-pane -U
|
||
|
bind l select-pane -R
|
||
|
bind-key -r C-h select-window -t :-
|
||
|
bind-key -r C-l select-window -t :+
|
||
|
unbind [
|
||
|
bind ` copy-mode
|
||
|
unbind p
|
||
|
bind p paste-buffer
|
||
|
bind -t vi-copy v begin-selection
|
||
|
bind -t vi-copy y copy-selection
|
||
|
|
||
|
# after copying to a tmux buffer, hit y again to copy to clipboard
|
||
|
bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
|