Sublime Notebook: An attempt to use Sublime Text as my note taking application

Avi Aryan
Avi Aryan's Blog
Published in
5 min readFeb 23, 2017

--

This article points to an old version of the software. To learn more about the newer version of Sublime Notebook, visit https://github.com/aviaryan/SublimeNotebook

How often does it happen that you stumble upon a new note taking application and resolve to use it, but later find that it misses certain features you want. Example, Evernote users may think that the application is bloated and slow, SimpleNote users may think that the application is very plain with no heirarchy and security features, CintaNotes users may face issues when migrating to a Unix based platform as CintaNotes is not supported there.

Above all, you want to be in total control of your notes and don’t want to risk losing them at any cost..

I have been a super note-taker since I started using computers. At first, I was on Windows and I started with OneNote but soon I had to reinstall Windows and as a result my notes were gone (wasn’t much Internet friendly back then). I then switched to CintaNotes on Windows and it was all great but then I switched from Windows to Linux where CintaNotes was not available. So I settled for another application, CherryTree which works on both linux and Windows. This was going good but then I got a Mac and started using OSX. Cherrytree won’t work here so I again lost my old notes and right now I use the inbuilt note taking app. Till now, I have lost my notes around 3–4 times so I am really fed up with it. I hesitate to use Evernote/OneNote because — 1) It’s heavy and slow 2) It’s a commercial application 3) My notes are stored on a different server in a propreitary format.

I would like to clear here that I am a text-only note taker. I use text notes to store useful links, great code snippets, tips and tricks on using stuff, reminders, diary entries and what not. Therefore my notes are light-weight and can be stored as simple .txt files. That made me work on an idea where we could store notes on Dropbox as txt files. This was good but it had some problems like no search across note files, no security (in case someone borrows your laptop), no visualized hierarchy etc. That’s when the idea of using Sublime Text struck me as my notes taking application.

So I went ahead and created a helper script that gives me additional note taking features. Using this script along with the Sublime Text setup mentioned in this post, you will be able to -

  1. Search across notes
  2. Store notes with hierarchy and view them
  3. Encrypt and secure notes
  4. Sync your notes across all desktop platforms

Before we proceed, here are the requirements for using this setup.

  1. Sublime Text
  2. Python 3
  3. [Optional] A cloud sync application setup (Dropbox, Google Drive, OneDrive etc)

So let’s begin. What you do is you first download the code from https://github.com/aviaryan/SublimeNotebook

Then you put the code files in a cloud synced or local folder of your choice. Now you are all set. You can create any number of notes in that folder. For hierarchy, you can use folders and sub-folders. Notes can be txt or md files and they will be encrypted with your password.

An encrypted note

🌟 If you want to keep some notes in un-encrypted form, you can store them inside a folder named “public”. Every note inside the public folder (recursively) won’t be encrypted.

To encrypt or decrypt notes, you use the manager.py file. It runs in Python 3 and requires no additional dependencies. It is recommended you change the first line of the file to point to your interpreter.

#!/Users/aviaryan/miniconda3/bin/python

So when you run manager.py for the first time, it will find the notes and ask you a password for encryption. After getting the password, it will encrypt all non-public notes using that password. In the subsequent runs, manager.py will work as an unlocker where it will ask password to decrypt the notes and then pause its execution. Now you can view and edit your notes and then later on encrypt them again by entering ‘e’ in the prompt.

manager.py running

Note taking features

You might be wondering how does this make it a note taking application. Well, let me show you.

Open Sublime Text and click on “Open Project” in the Project menu.

Browse for the notebook.sublime-project file in the folder you downloaded and open it. Now open the Sidebar (View -> Sidebar). You will see all your notes presented there with the hierarchy. Whenever you want to open your Sublime Notebook, you can use the switch project shortcut (Cmd-Ctrl-P or Ctrl-Alt-P) and select notebook.sublime-project to switch to the Notebook project.

If at the moment, you are in an encrypted state, you can use Ctrl-B (Cmd-B on OSX) to launch a terminal window in the manager.py's directory. So run manager.py from there to decrypt your notes. Now you can update the notes in Sublime Text and re-encrypt them.

If you want to search through all your notes, use the Sublime Text’s search in project feature (Ctrl-Shift-F or Cmd-Shift-F).

If you store the folder in Dropbox or Google Drive, you can have it on all your computers. Also, I will like to add here that the Python 3 script uses no extra dependencies so you can run the script out-of-the-box on any system that has Python installed (popular Linux distros and Macs for example have it by default).

Wrapping it up

This is just a Proof-Of-Concept. It can be very well extended to improve the note-taking experience. Like you can use the Sublime Markdown Extended (tutorial) plugin to highlight your *.md notes like a boss. I plan to continue investing my time on it since I am an avid note-taker and am continuously striving to improve my experience.

Let me know if you have any ideas and suggestions. I will be glad to discuss them. And always feel free to open an issue on SublimeNotebook GitHub.

Youtube Demo:

--

--