Using Vim as a note-taking app
Vim allows you to run Ex commands using
-c. For example, typing
vim -c 'r!date'
read the output of
date to the buffer.
Making it useful
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.
Syncing with iCloud
iCloud files are located in
~/Library/Mobile Documents/com~apple~CloudDocs. Just store your notes there to access them from anywhere.