function pbedit set tmpfile (mktemp /tmp/pbedit.XXXXX) pbpaste > $tmpfile if vim -c "set nofixeol" $tmpfile pbcopy < $tmpfile end rm $tmpfile end