Using Vim to simple ToDo lists

1,009 views
Skip to first unread message

Jonathan Ploudre

unread,
Mar 21, 2005, 9:43:24 AM3/21/05
to 43Fo...@googlegroups.com
For all the unix gurus out there, this will seem really basic. But
here's a few steps for newbie vim users that shows a little vim power.

1. Add this to you .vimrc file to enable incremental searching and
highlighting of search results:

:set incsearch
:set hlsearch

2. Open up your todo.txt that has, say, [ ] to indicate an undone item.

3. Search for an undone item in the command mode

/[ ] (then hit return to finish the search)

4. Notice how all your undone items are highlighted.

5. You can navigate to the next search result with "n" or previous
result with "N"

6. Go to one you want to change and finish it off. Say, edit it into
[x]. Now you can still go to the command mode with <esc> and use n/N
to move around to next/prevous search results.

7. Here's magic. Once you get to another you want to change type a dot
"." to repeat the same editing. Now you can quickly change a bunch of
items by typing n to get there and . to change it.

--
Jonathan Ploudre

J.Shell

unread,
Mar 21, 2005, 10:05:49 AM3/21/05
to 43Fo...@googlegroups.com
There's a todo add-on for the VimOutliner. It gives some extra key
commands for marking done/undone. I only used it briefly when
evaluating VimOutliner a long time ago (I decided to stick to using
desktop OS X apps), but it seemed decent enough.

Kyle Maxwell

unread,
Mar 21, 2005, 12:14:54 PM3/21/05
to 43Fo...@googlegroups.com
If this is interesting to you, check out http://vimoutliner.org/ with
the checkboxes plugin.

Erik Westra

unread,
Mar 21, 2005, 3:38:38 PM3/21/05
to 43Fo...@googlegroups.com
I have a much simpler solution for vim which works great for me...

I've added the following to my _vimrc file:

map <C-Down> ddp
map <C-Up> dd<Up>P

I then type out my To-Do lists, with one line of text per item. With
the above keyboard mappings, I can then simply move an item higher up
in the list by placing the cursor on that item and pressing control
up-arrow, and likewise can move an item down the list by pressing
control down-arrow.

I find that this, together with putting a "+" at the front of each
item as I finish it (and then deleting old items every now and then),
gives me all the flexibility and power I need for maintaining quite
complicated To-Do lists in vim. No need for extra software, and it
works so well that, like Quicksilver, the tool just fades into the
background and lets me focus entirely on the task at hand: ie,
maintaining the To-Do list.

Cheers,

- Erik.

mattkeller

unread,
Mar 21, 2005, 5:29:38 PM3/21/05
to 43Fo...@googlegroups.com
I was already a vimoutliner user before I started GTD, and I'm
continuing to use it. It works really nice with the checkbox plugin.
I keep a general TODO.otl list for my single-action items, and a
separate <project_name>.proj.otl file per project. The project files
consist mostly of general notes and plans about each project -- but
each Next Action within the project is marked with the "[_]" open
checkbox. To review my total list of next actions, I have a simple
shell-script that greps my project files for "[_]" and also lists my
TODO.otl.

Anybody else doing something similar? Suggestions?

Matt

sckot

unread,
Mar 22, 2005, 7:32:36 PM3/22/05
to 43Fo...@googlegroups.com
I was like, "No way!", and Erik Westra <ewe...@gmail.com> was all:
> I have a much simpler solution for vim which works great for me...
> I've added the following to my _vimrc file:
> map <C-Down> ddp
> map <C-Up> dd<Up>P
>
> I then type out my To-Do lists, with one line of text per item. With
> the above keyboard mappings, I can then simply move an item higher up
> in the list by placing the cursor on that item and pressing control
> up-arrow, and likewise can move an item down the list by pressing
> control down-arrow.
Good one! If you do same with "imap" and it will work while in
insert mode, as well.

> I find that this, together with putting a "+" at the front of each
> item as I finish it (and then deleting old items every now and then),
> gives me all the flexibility and power I need for maintaining quite
> complicated To-Do lists in vim. No need for extra software, and it
> works so well that, like Quicksilver, the tool just fades into the
> background and lets me focus entirely on the task at hand: ie,
> maintaining the To-Do list.
Also, if you put other symbols at the front of the line (such as
a number or quantity of *s proportional to priority, or a particular
"context:"), you can just pipe the list (or particular section of it)
through sort:
:%!sort
to automatically re-sort it. This can be remapped to a keystroke,
as well.

hope this is useful,
sckot
--
"I DISPENSE A SOOTHING THROAT LOZENGE!" -Pokey the Penguin
Reply all
Reply to author
Forward
0 new messages