Easy todo and notes management with VIM, dmenu and bash
I have been taking notes and managing my todo lists for quite some time. During this time I have used different tools for both. For note taking I tried evernote, google docs, obsidian, OneNote, regular files and quite a few others. The same goes for todo lists. I probably used everything from top 20 list for apps for todo management (even taskwarrior). But in the end I ended up using just neovim, dmenu and a little bit of shell magic.
Disclaimer: If you are not a proficient vim user this probably won’t be helpful for you.
This setup is not for everyone and it is not the best way to solve this issues for everybody but currently it the most efficient but more importantly most enjoyable way for me personally. If you want to feel the same you at least need to be good with vim and keyboard.
I don’t want to dig deep into why other methods didn’t work for me much but main reasons were that some were forcing me to use mouse, some were slow, some were too strict and forcing me to do things their way and all of them were not good with editing text. And since I have been using for at least 10 years it is natural that I slowly gravitated towards using vim for my note taking and todo list management since these are text editing tasks and vim is is my goto tool for that.
So three or four years ago I first started with creating a todo.txt and after some time Notes.txt at my home directory. These were my inboxes as in David Allens inbox terminology. The process was like this if I wanted to write some todo I just opened a terminal then I would type “nvim todo.txt”, press ‘G’ to go to bottom write down whatever I wanted, save and quit with “:wq” and close terminal. Even though it seems like a lot of stuff happening this process was faster than anything that I used before.
A few month ago this files started to get a little too big for me to handle as I was using them not only as inboxes but also to contain other stuff. Like for todo The top of the file contained everything I needed to do today and bottom contained my inbox (and other stuff in between). The same problem was with Notes.txt file. So I decided to split them into separate files but the I will lose my advantage of quickly openining them.
The solution was to move files in their corresponding folders, write a script that will load vim with correct file and path set and use something that will help me with launching that script. I chose to put all my todos in ’~/Documents/todo/’ and notes in ’~/Documents/notes/’. The exact locations does not matter as long they are accessible.
st -e nvim -c "normal! Gzz" todo.txt
st -e nvim -c "normal! Gzz" note.txt
At the beginning the scripts were a bit larger as I was trying to be too smart and didn’t know what I was doing but later it distilled to this short commands. The idea is that I first cd into the correct folder and launch vim with correct file. Later I added a normal mode command to move to the end of file (G) and then vertically center last line (zz). One more addition could to be to enter insert mode but in my use cases I open these files for slightly more for reading that for writing so it was not needed.
The next step is to make these scripts executable to put them somewhere where shell could find them for execution and them make them launch somehow. One way was just open a terminal and type the script names to open correct file. But that is too slow. At the time I was using dwm and as a result dmenu. I have been launching apps with dmenu for years now and thus it was a natural for me to go with dmenu (but any suitable launcher will be just as good). So my process became pressing Win+P (dmenu is bind to it), typing the name of script and voila I am can write my todo/notes. When I am done “:wq” just dismisses them.
This way all my writing process get unified I don’t have to think about it. In reality from the time something comes to my mind to the time I start writing it takes less that a second. And it does not matter what I was doing at the moment, writing a android app in android studio, drawing in inkscape or just doing regular browsing. This way ideas don’t get in the working process anymore as I just quickly jot them down and continue doing whatever I was doing.
This way I can use all my vim and unix tools that I use regularly on the tasks of note taking and task manament. For exampel I can easily quickly grep for something or format content is a specific way.
Here is how it looks like for todo browsing.
As you can see split my tasks in categories like reaseach, wants, read and etc. _blackhole.txt is for stuff that been processed from inbox and I don’t know when and if I will do them. _skip is for tasks that I decided never do but log them there just for fun. Others are self explanatory.
Notes folder is smaller because I have not yet fully decided where I want to store the notes. Currently all notes related to a project I store within that project but will be moving quite some of them into this folder.
You don’t need any plugins for this system to work but something like a nerdtree or ctrl-p could be quite useful if you have a lot of files.
In order to show how it could work in real life I recorded a short video of using both notes and a todo. Of course when I am recording for some reason I forgot how to type but if you don’t pay attention to my slow typing you can see that this system is really quite fast and does not break though process when you need it.
One the most influential stuff that changed my life was reading David Allens book “Getting things done” and learning about the idea of inbox. I cannot say that I am true GTD user and that I follow everything that is there but I definetely use inbox quite heavy. I literaly use if for everythiin. The is mail inbox, there is todo inbox, notes inbox, inbox for files and etc. This simple idea helped remove clutter from my head so much and I recommend everybody at least to try it