Vim allows you to run Ex commands using
-c. For example, typing
vim -c 'r!date'
read the output of
date to the buffer.
We can chain commands to turn it into a Markdown note-taking app:
vim -c 'r!date' -c 'normal i# ' ~/notes.md
Now every time you run that command, Vim will add a header with the current date at the top. Alias it to
note to easily jot down notes from the terminal.
iCloud files are located in
~/Library/Mobile Documents/com~apple~CloudDocs. Store your notes there to access them from anywhere.