diff options
author | Aaron LI <aaronly.me@outlook.com> | 2016-07-30 19:20:24 +0800 |
---|---|---|
committer | Aaron LI <aaronly.me@outlook.com> | 2016-07-30 19:20:24 +0800 |
commit | b5cbb3dd3928c7efbe567801dbe55e8e1294bd1a (patch) | |
tree | aadbefee209bcb01fb494af41df60904d1162bc4 /_tmux.conf | |
parent | deb3feb95314e593db1e9058b2e9860f22015a7b (diff) | |
download | dotfiles-b5cbb3dd3928c7efbe567801dbe55e8e1294bd1a.tar.bz2 |
tmux: update copy mode settings with vi keybindings
Diffstat (limited to '_tmux.conf')
-rw-r--r-- | _tmux.conf | 25 |
1 files changed, 19 insertions, 6 deletions
@@ -1,9 +1,10 @@ ## ## ~/.tmux.conf +## See tmux(1) for details. ## ## Aaron LI ## Created: 2015-01-22 -## Updated: 2016-07-26 +## Updated: 2016-07-30 ## ## References: ## [1] tmux: Productive Mouse-Free Development (by Brian P. Hogan) @@ -25,15 +26,16 @@ unbind-key C-b set-option -g prefix C-a -## Start window numbering at 1 +## Use 'vi' key bindings in copy and choice modes +set-window-option -g mode-keys vi + +## Start window and pane numbering at 1 set-option -g base-index 1 +set-window-option -g pane-base-index 1 ## Renumber the windows when a window is closed set-option -g renumber-windows on -## Start pane numbering at 1 -set-window-option -g pane-base-index 1 - # URxvt tab like window control bind-key -n S-Down new-window bind-key -n S-Left previous-window @@ -44,6 +46,13 @@ bind-key -n C-Right swap-window -t +1 ## Detach tmux instead of exit bind-key -n C-d detach +## Copy mode settings +bind-key p paste-buffer +bind-key -t vi-copy "v" begin-selection +bind-key -t vi-copy "y" copy-selection +# toggle between line- and column-wise selection +bind-key -t vi-copy "V" rectangle-toggle + ## Mouse control (>= v2.1) set-option -g mouse on bind-key m set-option -g mouse on \; display "Mouse: ON" @@ -107,7 +116,7 @@ set-window-option -g monitor-activity off ###### Tmux Plugins ###### -# List of plugins +## List of plugins set-option -g @plugin "tmux-plugins/tpm" # Basic tmux settings everyone can agree on set-option -g @plugin "tmux-plugins/tmux-sensible" @@ -124,6 +133,10 @@ set-option -g @plugin "tmux-plugins/tmux-pain-control" # Tmux key bindings for quick opening of a highlighted file or URL set-option -g @plugin "tmux-plugins/tmux-open" +## Plugin settings +# tmux-yank: +set-option -g @shell_mode 'vi' + # Automatic TPM installation # Credit: https://github.com/tmux-plugins/tpm/blob/master/docs/automatic_tpm_installation.md if "test ! -d ~/.tmux/plugins/tpm" \ |