Hi, I set up viki and added the following to my .vimrc
au BufRead,BufNewFile *.viki set ft=viki
let g:vikiFolds = 'hHl'
let g:vikiFoldMethodVersion = 7
When I open a .viki file with headings (* Heading1, ** Subheading, etc..) and press "zc" to fold headings (tried both inside the heading itself and in text under the heading), i get "E490: No fold found".
I'm kind of a vim newbie but I've had a peek at the code and the "^\*\+" regex does find the headings in my .viki files. What am i missing?
If the buffer looks like this:
Then typing /^\*\+<cr> where <cr> is the enter button, doesn't match anything?
What is the value of magic:
/^\*\+ matches * in line 1 and ** in line 3
:echo &magic returns 1
BTW: ":echo &foldmethod" returns "manual" and ":echo &foldexpr" returns 0
Shouldn't it be "expr" and 1 or 2 depending on where in the example buffer i am?
ftplugin/viki sets these options:
You could try
:verb set foldexpr
to find out where foldexpr was set.
Ah, it was a PEBCAK issue. I didn't read the requirements carefully and forgot to add
filetype plugin indent on
to my .vimrc
Folding works after i added that.
Thank you for your help. Great plugin!
Log in to post a comment.