by rocketcity · 9y ago · 0 comments
My system is quite simple. I have created a github repo called journal and an alias which opens vim to a markdown file for today's date. If I leave the file and come back later vim will drop me in at the end of the journal. I intend to add some vimscript in the future to automatically add a timestamp when I reopen the file but haven't gotten there yet.
This system has been quite helpful to me as it is resilient to data loss as I can push to multiple backup systems. Easily searchable (grep). And can support prettier documents if I want to open my Markdown formatted journals in tools like Macdown.
TL;DR I use vim to manage this. See alias below.
alias journal='vim + "/Users/username/journal/$(date +%Y)/$(date +%Y%m%d).md"'
alias journal='vim + "/Users/username/journal/$(date +%Y)/$(date +%Y%m%d).md" -c "execute \"normal! Go$(date +%T)\<CR>========\<CR>\" | startinsert "'alias journal='mkdir -p /Users/insert_your_username_here_on_mac_on_linux_change_Users_to_home_on_windows_good_luck/journal/$(date +%Y)/; vim + "/Users/insert_your_username_here_on_mac_on_linux_change_Users_to_home_on_windows_good_luck/journal/$(date +%Y)/$(date +%Y-%m-%d).md" -c "execute \"normal! Go$(date +%r)\<CR>========\<CR>\" | startinsert "'