Skip to content

Instantly share code, notes, and snippets.

@chadlavi
Created July 16, 2018 17:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chadlavi/15fd674162ccbd2f4765bd76f3321f13 to your computer and use it in GitHub Desktop.
Save chadlavi/15fd674162ccbd2f4765bd76f3321f13 to your computer and use it in GitHub Desktop.
add me to your bash_functions
note () {
local note="$HOME/notes.md"
if [ ! -z "$1" ]
then
gdate +###\ %Y-%m-%d\ %H:%M >> $note
echo "$@" >> $note
echo "" >> $note
else
vim + -c ':r! gdate +\#\#\#\ \%Y-\%m-\%d\ \%H:\%M && echo' +star $note
fi
}
@theptrk
Copy link

theptrk commented Jul 17, 2018

What is star?

@godDLL
Copy link

godDLL commented Sep 19, 2018

+star will put you in INSERT mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment