Skip to content

Instantly share code, notes, and snippets.

@franckbret
Created June 30, 2019 23:21
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 franckbret/c1a2fb843dbcdff494765988a898f5ea to your computer and use it in GitHub Desktop.
Save franckbret/c1a2fb843dbcdff494765988a898f5ea to your computer and use it in GitHub Desktop.
# For binding 'y' to copy and exiting selection mode
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -sel clip -i'
# For binding 'Enter' to copy and not leave selection mode
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe 'xclip -sel clip -i' '\;' send -X clear-selection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment