Saturday, June 19, 2010

Ubiquitous note taking with Vim and Dropbox

Finally I found the combination of a best data sync tool called Dropbox and my favorite text editor Vim for ubiquitous note taking. To make it even seamless, I added following to my .vimrc and sharing it with you guys:
map <leader>nn :tabedit ~/Dropbox/YourName/notes/
<leader> here is a mapleader, which is a special variable in vim that you can bind to a key in your vimrc. I use following to map it to ","
let mapleader = "," 
After that you can use comma with the combination of any characters for mapping things that you end up doing a lot. In this case, I mapped it to creating a new file in a new tab within ~/Dropbox/YourName/notes/ folder with whatever name that I will type before hitting the enter key.  Above setting will allow following work flow:
1. Open vim
2. Just type ,nn and enter the file name you want
3. Hit enter and start typing
Creating a new notes could not be more easier and pleasant than this knowing that your notes will be automatically synchronized across multiple computers even on mobile phones. Enjoy!

No comments:

Post a Comment