Skip to content

Instantly share code, notes, and snippets.

@pgib
Created October 31, 2013 05:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pgib/7244727 to your computer and use it in GitHub Desktop.
Save pgib/7244727 to your computer and use it in GitHub Desktop.
vim-style copy and paste for tmux
# =======================================================================
# vim-style copy and paste
setw -g mode-keys vi
bind ] paste-buffer
bind-key -t vi-copy 'v' begin-selection
#bind-key -t vi-copy 'y' copy-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"
# =======================================================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment