Last active
July 11, 2018 18:47
-
-
Save dpavlin/441f4ebdca46f6a197686be16a0f61b8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/sh | |
# workflow: | |
# 1. focus textarea in browser you want to edit | |
# 2. press ctrl+a then ctrl+c | |
# 3. switch to terminal and start this script with optional extensioni for highlight: xclip-vi html | |
# 4. edit file in vi, and save it | |
# 5. switch back to browser, and press ctrl+v in already selected textarea | |
ext=$1 | |
test -z "$ext" && ext=txt | |
xclip -out > /tmp/$$.$ext && vi /tmp/$$.$ext && xclip -in -selection clipboard < /tmp/$$.$ext |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment