mirror of
https://github.com/tomru/DotfilesOld.git
synced 2026-03-04 06:57:23 +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
|
set -g prefix C-a
|
||||||
bind C-a send-prefix
|
bind C-a send-prefix
|
||||||
|
|
||||||
# Copy-paste integration
|
# Use vim keybindings in copy mode
|
||||||
setw -g mode-keys vi
|
setw -g mode-keys vi
|
||||||
bind -t vi-copy 'v' begin-selection
|
|
||||||
bind -t vi-copy 'y' copy-selection
|
# Setup 'v' to begin selection as in Vim
|
||||||
bind y run-shell "tmux show-buffer | xclip -sel clip -i" \; display-message "Copied tmux buffer to system clipboard"
|
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
|
# splitting panes
|
||||||
bind v split-window -h
|
bind v split-window -h
|
||||||
|
|||||||
Reference in New Issue
Block a user