4 ms·
A script might finesse things a little more, but you could get a naive implementation of the timestamp behavior with something like: alias journal='vim + "/U
by 0x03 9y ago
A script might finesse things a little more, but you could get a naive implementation of the timestamp behavior with something like:
alias journal='vim + "/Users/username/journal/$(date +%Y)/$(date +%Y%m%d).md" -c "execute \"normal! Go$(date +%T)\<CR>========\<CR>\" | startinsert "'
- poidos 9y agoThis command (as presented) is giving me issues with saving the file on my machine, not sure if it's specific to only me but figured I'd give you a heads-up!
- nutate 9y agoHere's a nice hacked up version, note the mkdir -p that makes the directory if it doesn't exist. Also I changed the time from 24hr to more provincial 12hr w/ AM/PM Please be careful adding aliases if you aren't sure what' they're doing! 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 "'