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?
Thank you,
-Dmitriy
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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?
Thank you,
- Dmitriy
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I set up viki and added the following to my .vimrc
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?
Thank you,
-Dmitriy
If the buffer looks like this:
---BEGIN---
* Foo
** Bar
---END---
Then typing /^\*\+<cr> where <cr> is the enter button, doesn't match anything?
What is the value of magic:
:echo &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?
Thank you,
- Dmitriy
ftplugin/viki sets these options:
setlocal foldexpr=VikiFoldLevel(v:lnum)
setlocal foldtext=VikiFoldText()
You could try
:verb set foldexpr
to find out where foldexpr was set.
Regards,
Tom
Ah, it was a PEBCAK issue. I didn't read the requirements carefully and forgot to add
to my .vimrc
Folding works after i added that.
Thank you for your help. Great plugin!
-Dmitriy