Last active
August 28, 2018 09:56
-
-
Save tongphe/a0fc556ee87e40babcee71305eae76a3 to your computer and use it in GitHub Desktop.
Tmux ssh-agent and vi mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -g prefix F1 | |
set -g base-index 1 | |
set -g pane-base-index 1 | |
set -g status-bg black | |
set -g status-fg white | |
set -g status-left-length 50 | |
set -g status-right-length 150 | |
set -g status-interval 5 | |
set -g status-left '#[fg=cyan,bold]#(hostname)' | |
set -g status-right '#[default] #[fg=cyan,bold]%Y-%m-%d %H:%M:%S#[default]' | |
set -g window-status-current-bg red | |
bind r source-file ~/.tmux.conf | |
bind k clear-history | |
bind Left swap-window -t -1 | |
bind Right swap-window -t +1 | |
setenv -g SSH_AUTH_SOCK ~/.ssh/ssh_auth_sock | |
set -g update-environment -r | |
set-window-option -g mode-keys vi | |
bind v copy-mode | |
bind P paste-buffer | |
bind s choose-buffer | |
bind-key -T copy-mode-vi 'v' send -X begin-selection | |
bind-key -T copy-mode-vi 'c' send -X rectangle-toggle | |
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel | |
# tmux 2.3- | |
#bind-key -t vi-copy 'v' begin-selection | |
#bind-key -t vi-copy 'c' rectangle-toggle | |
#bind-key -t vi-copy 'y' copy-selection |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment