> On Jun 20, 2011, at 2:12 PM, Vlad Irnov wrote:
>
> >> Thanks, Vlad. I've copied the script from the github. Folding is not working for me very well, not at all really. When I first tried it on the readme.markdown file I managed to get a partial fold on the first header, but not on any others. I get only "Fold could not be found errors." By "partial" I mean that only some of the lines subordinate to the header were included in the fold. Subsequently I have not been able to generate any folds in the file, not even the one on the first header with which I had success initially. Perhaps I do not understand expression based folding, and within that, markdown header based folding.
>
> > Execute the following command in a markdown file such as
> > README.markdown to see if everything was set up correctly
> > :set ft? fdm? fde?
> > The output should be
> > filetype=markdown
> > foldmethod=expr
> > foldexpr=Foldexpr_markdown(v:lnum)
>
> Thanks for sticking with me on this, Vlad. I sense that when we get this working I'll find it very useful.
>
> The results I got from executing the command you suggested varies from what it should be. They are:
>
> filetype=markdown
> foldmethod=manual
> foldexpr=0
>
> The only thing in my .vimrc that relates to folding are the two lines I included in my last response, and that are commented out. I checked two other plugins that I have installed, VimOutliner and TaskPaper.Vim. In files that are in ~/.vim/ftplugin both have fold-related commands, but they are executed with setlocal, e.g., setlocal foldmethod=syntax. I'm assuming these will not affect fold setups for other filetypes.
>
> I notice from your script that the location of markdown.vim file is slightly different from where I've put it. The former says it should go in ~/.vim/after/ftplugin. I have it in ~/.vim/after/plugin. Could that be the problem?
Yes, that's the problem. Make sure that file markdown.vim with my code
is in directory
~/.vim/after/ftplugin/
Delete ~/.vim/after/plugin/ if there is nothing else there, I doubt
you will ever need it.
It's not necessary to learn all options and commands at once. Some are
more useful than other. The most essential commands when dealing with
folds are
zR --open everything
zM --close everything
zo --open one fold
zc --close one fold
zv --make cursor line visible
zMzv closes everything except fold at cursor.
Regards,
Vlad
--
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:
Post a Comment