Skip to content

Commit

Permalink
New syntax for bind-keys
Browse files Browse the repository at this point in the history
  • Loading branch information
mparada committed Mar 4, 2019
1 parent de45000 commit bf0ce72
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ bind r source-file ~/.tmux.conf

# Use vim keybindings in copy mode
setw -g mode-keys vi
bind-key -t vi-copy v begin-selection
unbind -t vi-copy Enter
bind-key -T copy-mode-vi v send-keys -X begin-selection
unbind -T copy-mode-vi Enter

# List of plugins
set -g @plugin 'tmux-plugins/tpm'
Expand Down
4 changes: 2 additions & 2 deletions .tmux.conf.osx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
set-option -g default-command "reattach-to-user-namespace -l bash"

# Setup 'v' to begin selection as in Vim
bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
bind-key -T copy-mode-vi y send-keys -X copy-pipe "reattach-to-user-namespace pbcopy"

# Update default binding of `Enter` to also use copy-pipe
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe "reattach-to-user-namespace pbcopy"

# Bind ']' to use pbpaste
bind ] run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"
Expand Down

0 comments on commit bf0ce72

Please sign in to comment.