Skip to content

Instantly share code, notes, and snippets.

@Leask
Last active May 27, 2017 18:01
Show Gist options
  • Save Leask/6029272 to your computer and use it in GitHub Desktop.
Save Leask/6029272 to your computer and use it in GitHub Desktop.
Use Sublime Text as a simple note taking tool
#!/bin/sh
# Flora Note by LeaskH.com
list() {
ls $note_path
}
edit() {
"$editor" $note_path
}
search() {
grep -r "$*" $note_path
}
fopen() {
open $note_path
}
# Config
note_path=~/Documents/Notes
editor='/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl'
# Main logic
alias ls='ls -aiBFhlOT'
alias grep='grep --color=auto -ni --binary-files=without-match --exclude-dir .git'
case "$1" in
'l') list;;
'o') fopen;;
's') search "$2";;
*) edit;;
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment