With vimwiki you can fold headers and lists as following:
Example for headers and list folding:
= My current task =
* [ ] Do stuff 1
* [ ] Do substuff 1.1
* [ ] Do substuff 1.2
* [ ] Do substuff 1.2.1
* [ ] Do substuff 1.2.2
* [ ] Do substuff 1.3
* [ ] Do stuff 2
* [ ] Do stuff 3
Hit zM:
= My current task = [8] --------------------------------------
Hit zr:
= My current task =
* [ ] Do stuff 1 [5] --------------------------------------
* [ ] Do stuff 2
* [ ] Do stuff 3
Hit zr one more time:
= My current task =
* [ ] Do stuff 1
* [ ] Do substuff 1.1
* [ ] Do substuff 1.2 [2] -------------------------------
* [ ] Do substuff 1.3
* [ ] Do stuff 2
* [ ] Do stuff 3
The header-folding (= Header =
) does works for me, but list-folding (* [ ] list
) doesn't.
Vimwiki says this about list-folding, but I don't understand what it exaclty means:
NOTE: If you use the default vimwiki syntax, folding on list items will work properly only if all of them are indented using current shiftwidth. For MediaWiki,
*
or#
should be in the first column.
My vimrc is as following:
call vundle#begin()
Plugin 'vimwiki'
call vundle#end()
set nocompatible
filetype plugin on
syntax on
set foldmethod=syntax
Plugin 'vimwiki'
looks like Vundle, but AFAIK you need to usecall vundle#begin()
andcall vundle#end()
...vim -u test-vimrc.vim
to use a different vimrc file.