In my .zshrc:<p><pre><code> # Summary: run `note <title>` to make a new note
# run `notes` to get a fuzzy finder (if available) to view all notes
function note() {
NOTE_DIR=~/Dropbox/notes
mkdir -p $NOTE_DIR || true
NOTE_NAME="$1"
if [[ -z $NOTE_NAME ]]; then
NOTE_NAME="$(date +%Y-%m-%d)"
else
NOTE_NAME="$(date +%Y-%m-%d)-$NOTE_NAME"
fi
vim $NOTE_DIR/$NOTE_NAME.txt
}
function notes() {
NOTE_DIR=~/Dropbox/notes
mkdir -p $NOTE_DIR || true
pushd $NOTE_DIR > /dev/null
# Use the fuzzy finder if available
if command_exists fzf; then
# Only open the selection if one was actually chosen
NOTEFILE=$(find * -type f -maxdepth 0 | fzf)
if [[ -n $NOTEFILE ]]; then
vim $NOTEFILE
fi
else
vim .
fi
popd > /dev/null
}
</code></pre>
I dump my notes in my Dropbox folder so that I get sync for free. And fzf makes finding notes super easy.
Sweet! BTW, this was made by mattn of go-sqlite3 fame.<p>I had never heard of "peco" before, the self-describe "simplistic interactive filtering tool" that is called if you run <i>$memo edit</i>. Looks pretty handy!
Ease of use points for sure (I could use something like this), but why does it need HTTP calls? Sincere question— my Monday morning brain can't grasp it.