ifacethoughts

More On Task Managemnt Using vim

I never expected that task management using vim will be used by others. It is a duct-tape approach that really worked well for me. My intention of putting up that post was to show usefulness of GTD and the extensibility of vim. I got some more queries about the task management system, so this is more about that than vim itself.

I need to retrieve tasks from multiple aspects – like pending tasks, urgent tasks or tasks which involves emailing or calling. I am doing this through some bash scripts, not so much in vim. Again, the benefit of this system is that you can have your own scripts and your own schema. If you haven’t read the earlier post, please do so.

I retrieve pending tasks by using the following script:

    #!/bin/bash
    cd ~/wiki/
    grep =`date --date='-7 days' +%d%m%Y` *.txt | grep -v '=done'
    grep =`date --date='-6 days' +%d%m%Y` *.txt | grep -v '=done'
    grep =`date --date='-5 days' +%d%m%Y` *.txt | grep -v '=done'
    grep =`date --date='-4 days' +%d%m%Y` *.txt | grep -v '=done'
    grep =`date --date='-3 days' +%d%m%Y` *.txt | grep -v '=done'
    grep =`date --date='-2 days' +%d%m%Y` *.txt | grep -v '=done'
    grep =`date --date='-1 days' +%d%m%Y` *.txt | grep -v '=done'
    grep =`date +%d%m%Y` *.txt | grep -v '=done'
    cd - > /dev/null

This is grep magic. The script retrieves tasks for last 7 days and then filters the one without =done stamp. Simple, no automation, no sophistication.

Or I get the urgent tasks using something similar:

    #!/bin/bash
    cd ~/wiki/
    grep =`date +%d%m%Y` *.txt | grep -i '=urgent'
    grep =`date --date='+1 days' +%d%m%Y` *.txt | grep -i '=urgent'
    grep =`date --date='+2 days' +%d%m%Y` *.txt | grep -i '=urgent'
    grep =`date --date='+3 days' +%d%m%Y` *.txt | grep -i '=urgent'
    grep =`date --date='+4 days' +%d%m%Y` *.txt | grep -i '=urgent'
    grep =`date --date='+5 days' +%d%m%Y` *.txt | grep -i '=urgent'
    grep =`date --date='+6 days' +%d%m%Y` *.txt | grep -i '=urgent'
    grep =`date --date='+7 days' +%d%m%Y` *.txt | grep -i '=urgent'
    cd - > /dev/null

This just gets me tasks scheduled in next 7 days marked as urgent. You can change this as you want.

I get my todos or next actions by a combination of the pending script and the week script, so it is just:

    #!/bin/bash
    pending
    week

Similarly I can get tasks that involve emailing by grepping for :email. The basic system is quite simple – organize the tasks using your own schema in a text editor. Use intelligent scripts to retrieve tasks as you want.

We can write similar scripts within vim itself.

I have got some requests to turn this into a plugin for vim. But I haven’t found time to dedicate to it, most of the times I am in a user mode than a developer mode. And frankly I wonder if we will lose some flexibility by moulding it into a plugin. I like to keep it as a hack.

A benefit of using the text format has been that I can pull in the output from these scripts anywhere I want, like my conky output. I will close this with a screen shot of my Arch Linux system:

Desktop screenshot showing tasks in conky.

Discussion [Participate or Link]

  1. Allan Wind said:

    You can dry those scripts with:

    (
    grep =`date –date=’-7 days’ +%d%m%Y` *.txt;
    grep =`date –date=’-6 days’ +%d%m%Y` *.txt;

    )| grep -v ‘=done’

  2. Ingo Karkat said:

    For those interested in alternatives, or to give you ideas about additional features for your todo implementation:

    Todo.txt is a command-line task management tool similar (but more advanced) to yours. It’s a Bash script that also runs under Windows/Cygwin.
    There’s also a Vim plugin that implements the todo.txt functionality (and some enhancements) purely in Vim.

Say your thought!

If you want to use HTML you can use these tags: <a>, <em>, <strong>, <abbr>, <code>, <blockquote>. Closing the tags will be appreciated as this site uses valid XHTML.

freshthoughts

contactme

Abhijit Nadgouda
iface Consulting
India
+91 9819820312
My bookmarks

badgesand...

This is the weblog of Abhijit Nadgouda where he writes down his thoughts on software development and related topics. You are invited to subscribe to the feed to stay updated or check out more subscription options. Or you can choose to browse by one of the topics.