Skip to content

Commit

Permalink
Update vi-mode bindings for tmux 2.4
Browse files Browse the repository at this point in the history
tmux/tmux#592

Also explicitly name tmux 2.4 in the readme
  • Loading branch information
Duncan Brown committed Jan 10, 2017
1 parent d9256b6 commit fd1bd9e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
@@ -1,5 +1,6 @@
## Dependencies

- tmux 2.4
- ZSH/oh-my-zshell
- For Ruby: rbenv
- For JS: yarn
Expand Down
7 changes: 5 additions & 2 deletions tmux.conf
Expand Up @@ -89,10 +89,13 @@ set-option -g allow-rename off

# https://robots.thoughtbot.com/tmux-copy-paste-on-os-x-a-better-future
# 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"
bind-key -Tcopy-mode-vi 'v' send -X begin-selection
bind-key -Tcopy-mode-vi 'y' send -X copy-pipe "reattach-to-user-namespace pbcopy"

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

unbind -t vi-copy Enter
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"

Expand Down

0 comments on commit fd1bd9e

Please sign in to comment.