Tuesday, July 3, 2012

Fold all blocks without TODO in vim notes file

Dear all,

I have the following vim notes file:

~  notes
~
~  #2012-04-12
~     ◦ DONE beer

~  #2012-04-13
~     ◦ DONE beer
~     ◦ DONE another beer
~
~  #2012-06-30
~     ◦ DONE beer
~     ◦ TODO another beer

~  #2012-07-02
~     ◦ TODO beer


If I start vim with
~ vi notes -c 'set foldenable' -c 'set foldlevel=0'
all blocks beginning with a hash mark are folded.
But I would like to have only the blocks folded
that do not have a TODO item in their list. In the
given example only the first two blocks 2012-04-12

and 2012-04-13 should be folded because they are
done completely.

How can this be done?


Best regards
Joseph

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: