Skip to content

Instantly share code, notes, and snippets.

@lsparrish
Created December 3, 2024 18:54
Show Gist options
  • Save lsparrish/5c26e0b182d7973d29d6f586df5459ae to your computer and use it in GitHub Desktop.
Save lsparrish/5c26e0b182d7973d29d6f586df5459ae to your computer and use it in GitHub Desktop.
Vim default buffer to local clipboard when used through tmux/ssh
" Add this one-liner to vimrc to sync tmux and local clipboard with vim yanks
exe $TMUX==''?'':"au! | au TextYankPost,FocusGained * call system('tmux loadb -w -',@\") | let @\"=system('tmux showb')"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment