X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=.tmux.conf;h=ef1626023fbafbdaed5a5fe6555dd665e0691406;hb=7597ba385417b725206e3f83f44d645e87e945d0;hp=b2089ede659c7c4320c7b3942e53e7a1d822e641;hpb=8250a1f3ecc4cad3d6b1ce184ca331e867a8a3b9;p=dotfiles.git diff --git a/.tmux.conf b/.tmux.conf index b2089ed..ef16260 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -4,8 +4,13 @@ set-option -g pane-base-index 1 # Renumber windows sequentially after closing any of them set-option -g renumber-windows on +# Keyboard +set-window-option -g mode-keys vi # Pass [Ctrl]+[PgUp/PgDn] set-window-option -g xterm-keys on +# Don't wait for [Esc] to allow fast switching from insert mode to normal in vim +# Set (and export) environment variable SLOWTERM to override. +if-shell "test -z $SLOWTERM" "set-option -gs escape-time 0" # Mouse set-window-option -g mode-mouse on @@ -67,7 +72,7 @@ set-option -g history-limit 1000 # bind-key C-a last-window # R to reload config without restart -bind-key R source-file ~/.tmux.conf \; display "Reloaded!" +bind-key R source-file ~/.tmux.conf \; display "Configuration reloaded!" # vim-like navigation unbind-key h; bind-key h select-pane -L @@ -87,10 +92,12 @@ bind -r C-l select-window -t :+ bind-key | split-window -h bind-key - split-window -v +bind-key -t vi-copy v begin-selection +bind-key -t vi-copy y copy-selection +bind-key -t vi-copy r rectangle-toggle +bind P paste-buffer + # Copy tmux copy buffer to X clipboard -# bind C-y run-shell "tmux save-buffer - | xclip -i" -bind -t emacs-copy C-p copy-pipe "xsel -i -p && xsel -o -p | xsel -i -b" -bind -t vi-copy C-p copy-pipe "xsel -i -p && xsel -o -p | xsel -i -b" +bind -t vi-copy C-y copy-pipe "xclip -i" # Copy X clipboard to tmux paste buffer -# bind C-p run-shell "xclip -o | tmux load-buffer -; tmux paste-buffer" -bind C-y run-shell "xsel -o | tmux load-buffer - ; tmux paste-buffer" +bind C-p run-shell "xclip -o | tmux load-buffer -; tmux paste-buffer"