mirror of
https://github.com/tomru/DotfilesOld.git
synced 2026-03-03 14:37:25 +01:00
use vim keybindings in copy mode
This commit is contained in:
13
tmux.conf
13
tmux.conf
@@ -17,11 +17,16 @@ unbind C-b
|
||||
set -g prefix C-a
|
||||
bind C-a send-prefix
|
||||
|
||||
# Copy-paste integration
|
||||
# Use vim keybindings in copy mode
|
||||
setw -g mode-keys vi
|
||||
bind -t vi-copy 'v' begin-selection
|
||||
bind -t vi-copy 'y' copy-selection
|
||||
bind y run-shell "tmux show-buffer | xclip -sel clip -i" \; display-message "Copied tmux buffer to system clipboard"
|
||||
|
||||
# Setup 'v' to begin selection as in Vim
|
||||
bind-key -t vi-copy v begin-selection
|
||||
bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
|
||||
|
||||
# Update default binding of `Enter` to also use copy-pipe
|
||||
unbind -t vi-copy Enter
|
||||
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
|
||||
|
||||
# splitting panes
|
||||
bind v split-window -h
|
||||
|
||||
Reference in New Issue
Block a user