Skip to content

Instantly share code, notes, and snippets.

@gdamdam
Last active January 31, 2017 18:42
Show Gist options
  • Save gdamdam/b055bd0f98e63711b6fe36f3005041cf to your computer and use it in GitHub Desktop.
Save gdamdam/b055bd0f98e63711b6fe36f3005041cf to your computer and use it in GitHub Desktop.
VIM Clipboard

Paste your clipboard to a file and open it with VIM

in your bashrc:

viclipboard () { 
    ( tmpfile=~/.clips/$(date +%Y%m%d%H%M%S);
    pbpaste > $tmpfile && vim $tmpfile && pbcopy < $tmpfile )
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment