←back to thread

2039 points Gadiguibou | 2 comments | | HN request time: 0s | source
1. adolph ◴[] No.36495894[source]
pb[paste|copy] are a life improver. Here is a one-liner to edit the pasteboard contents in vim.

  pbpaste > tmp; vim tmp; cat tmp | pbcopy; rm tmp;
I also use pbpaste to append various notes to files, but since pbpaste doesnt have a newline at the end I wind up using:

  echo "$(pbpaste)" >> notes.txt
replies(1): >>36495942 #
2. dharmab ◴[] No.36495942[source]
You can do this specific task with just vim: https://vi.stackexchange.com/a/21448