X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;ds=inline;f=.tmux.conf;h=c88fd3b83693cee9f610a3fb17edcfed4eb185ff;hb=2b945221ad1331603f83a5db1ba44bf0f86a611f;hp=fe4827c77e837727bd7676b296834639fb2b260c;hpb=7ae608fc1103371b8fa72fb027fb8206c25e9a15;p=dotfiles.git diff --git a/.tmux.conf b/.tmux.conf index fe4827c..c88fd3b 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -4,6 +4,8 @@ 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 @@ -56,8 +58,18 @@ set-option -g status-right '' # Increase scrollback lines set-option -g history-limit 1000 +# Set the command prefix to match GNU screen (CTRL+a) +# set-option -g prefix C-a +# +# Use C-a C-a key to send prefix instead of the default +# unbind-key C-b +# bind-key C-a send-prefix +# +# C-a for last-window +# 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 @@ -70,23 +82,19 @@ bind J resize-pane -D 10 bind K resize-pane -U 10 bind L resize-pane -R 10 -# Set the command prefix to match GNU screen (CTRL+a) -# set-option -g prefix C-a -# -# Use C-a C-a key to send prefix instead of the default -# unbind-key C-b -# bind-key C-a send-prefix -# -# C-a for last-window -# bind-key C-a last-window +bind -r C-h select-window -t :- +bind -r C-l select-window -t :+ # Use vertical and horizontal chars to split the screen 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 "tmux save-buffer - | xclip -i" -bind 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 "xclip -o | tmux load-buffer -; tmux paste-buffer" -bind C-y run "xsel -o | tmux load-buffer - ; tmux paste-buffer" +bind C-p run-shell "xclip -o | tmux load-buffer -; tmux paste-buffer"