Created
June 27, 2018 20:16
-
-
Save bisby/5c81183ec12583107646cc5c748f9648 to your computer and use it in GitHub Desktop.
Clipboard Editing Made Easy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eo pipefail | |
# Move clipboard into vim | |
pbpaste > /tmp/vim-scratch | |
vim -c "set nofixendofline" /tmp/vim-scratch | |
# Move vim back into clipboard | |
cat /tmp/vim-scratch | pbcopy | |
# Cleanup | |
rm /tmp/vim-scratch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment