About Jeroen
Contact
FAQ
Status
Todo in my life
His Blog
Articles
Photo Gallery

Outdoor:
  Recumbing
  Running

Software:
  jnitodo
  squidefender
  Wormwarner

Latest books read:
  • Lincoln Child - Deep Storm
  • Lee Child - The Hard Way
  • Mike Lawson - Dead on Arrival
  • Preston & Child - Still Life with Crows

Latest movies seen:
  • Death Race
  • The Objective
  • Deception
  • Hellboy - The Golden Army



23 September 2008

yellowbullet 20:55: Today it is 5 years ago that I registered the jeroen.se domain.
more

25 August 2008

yellowbullet 17:46: Since a few weeks I use the jnitodo todo list manager for managing my todo list. jnitodo was written by myself, so it matches my requirements quite well and it might match yours!
more

13 August 2008

yellowbullet 12:51: Yesterday I ran into a bug in my Samsung S1060 digital camera. If you press the view photos button while the red-eye flash pictogram is flashing white and red it hangs and becomes unresponsive.
more

11 August 2008

yellowbullet 12:59: While migrating my account to another machine which uses openldap authentication I ran into the problem that cron were not working on the new machine. A quick look in the logs revealed the following error:
more

29 July 2008

yellowbullet 17:50: I often get the question how I manage to survive my long commute time during the week. This question is often raised when in a conversation it becomes clear that I travel over 4 hours per day by train. In this blog post I will try to give a small insight in how I manage this.
more

09 July 2008

yellowbullet 13:23: Just a quick blog post about how to run a command like uptime in more than one screen window. Just do crtl-a then
:at "#" stuff "uptime\015"
more

28 June 2008

yellowbullet 21:58: I just reached the 1000 kilometer mark with my recumbent bike. It took me 46 hours and 24 minutes, averaging a 21.55 km/h speed. The last month however my average cycling speed is increasing, so I should do the next 1000 kilometer in less time.
more

Todo list management with vim

Like many people I am using a GTD based system for management of the things I have todo. My calendar is based on a Palm Treo 650 with datebk6. My todolist is however not on my Palm, but is edited with vim. Within Vim I use folds to easily move contexts more or less out of view when the context is not relevant to my current situation.

The text file format

The fileformat for my todolist is quit simple. The file starts with an $Id: todo_list_management_with_vim.m4 2194 2008-06-27 20:09:03Z jnieuwen $ tag for the subversion version management the todolist file is in. Subversion simplifies the moving of my todolist between computers.

A todo item is registered as:
- :
When an todo item is completed I just delete it from the file with something like the dd command.

A waiting for item is inserted as:
- wait: (year-month-day)
The year-month-day part is used to register the date I started to wait for the item. This makes it easier to see if a follow up from me is needed to get things rolling again when things get stalled. As with todo items, when a waiting for item is no longer relevant it is removed from the file.

Taking care of the folds

The most interesting part probably is the to make sure I have the correct folds. For that I have the following rules in my .vimrc file:
autocmd BufRead /path/to/todo.txt set number With this rule all lines have numbers. This is mainly for my convenience.

autocmd BufRead /path/to/todo.txt set foldmethod=marker
This line sets the foldmethod to marker. Which means that a fold is started on every line which ends with {{{1. Where 1 is the fold level. But for my todo list I only use level 1.

autocmd BufRead /path/to/todo.txt %!addfolds.pl
addfolds.pl is the script where the real magic happens. This scripts adds the {{{1 in the correct places and removes the {{{1 from the incorrect places.

autocmd BufRead /path/to/todo.txt %foldopen
This line makes sure that all folds are open when vim is started on the todo file.

An supplement to this article can be found on my blog.

Picture of me


Everything I say on these pages are opinions, they are not necessarily the truth.
Commercial use of the data on this site without permission is strictly prohibited.
Unique number: fc38fc2c1347a9824cef263d20748ced
10:12AM up 46 days, 15:13, 18 users, load averages: 0.01, 0.04, 0.10
XML

Powered by FreeBSD Generated by a bunch of M4 macros on Wed Oct 1 03:09:03 CEST 2008
$Id: todo_list_management_with_vim.m4 2194 2008-06-27 20:09:03Z jnieuwen $
© 2002 - 2008 Ir. Jeroen van Nieuwenhuizen
I know I'm not perfect but I can smile.