by brootstrap · 7y ago · 0 comments
It has gone through multiple forms, once where i created a new file everyday, and it wasnt automated much. One day I realized I could be even MORE lazy and started automating a bit. Now i have one file, with a heading for each day. I have the vim command saved as an alias now 'journal'. It opens up the file, moves to the end, and enters insert mode :p
alias journal='vim "+normal Go" +startinsert /worklog/start_20160426'# Pull Notes to make sure you are completely up to date before editing.
function pull_notes() {
(
cd $NOTES_DIR
git stash
git pull
git stash pop
)
}# Push Notes up the git repo that these are attached to.
function push_notes() {
date=$(date)
(
cd $NOTES_DIR
git add .
if [[ $(git status -s) ]]; then
git commit -m "Notes Updated: $date"
git push
fi
)
}