Quick Notes With BBEdit

January 22, 2012 by Gabe | [mmd] |

Occasionally I just want to make a quick note in NVAlt/Simplenote/Dropbox[1]. Of course, I can command tab to NVAlt and create a new note in relatively few clicks. But I’m using BBEdit more and more. If I want to create a quick note from BBEdit it’s not so quick. Here’s a modification of a script from John Gruber that creates a new note in my NVAlt Dropbox folder and opens it in BBEdit. The script is designed to be triggered from LaunchBar. Save the script (after updating the path with your own NVAlt document folder) in ~/Library/Application Support/LaunchBar/Actions.

on handle_string(message) set notesFolder to "/Volumes/Macintosh HD 2/Dropbox/Notes/" set timeStamp to (do shell script "date +'%Y%m%d_%H%M%S'") set filePath to quoted form of ((POSIX path of notesFolder) & message & "_" & timeStamp & ".txt") do shell script "/usr/local/bin/bbedit -c " & filePath end handle_string

To avoid any need to check for an existing file and warning if one already exists, I just create the file with my standard timestamp nomenclature. The idea is to get in and out, not to reach for the mouse to respond to a warning.

Note that this requires the BBEdit command line tools. If you bought BBEdit from the app store, it is a separate download from BareBones. The “-c” flag causes BBEdit to create a new file in that location.

Also note, I do not have my local/bin directory on my user path. So I must include the full path to use the BBEdit command line.


  1. I have all three syncing. If I make a note in Dropbox then it is automatically kept in sync with Simplenote by NVAlt.

blog comments powered by Disqus