#!/bin/bash dir="/tmp/vim-anywhere/" fn="$(date -Iseconds)" [ ! -d $dir ] && mkdir $dir vim $dir$fn && cat $dir$fn | xsel -b -i
Bonus: This works anywhere xorg is available.
xclip -o > "$tmpfile" # initialize file with clipboard contents gvim --nofork "$tmpfile" xclip -i "$tmpfile" # push file to clipboard
Bonus: This works anywhere xorg is available.