>> 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?
> What do you do to "generate" folds? With expression based folding you
> don't generate folds. They are created automatically when you load
> file or edit text. You can only close and open folds with commands
> zM,zR,zc,zo and so on. You can also enable option 'foldcolumn'
> :set foldcolumn=6
> and then open/close folds by clicking +/- signs with the mouse.
I've tried zf -- which I gather will not work? -- zc, and za. I haven't tried to define any folds. I understood that with this method folds are created automatically.
These are my settings for the fold-options that you left optional. I'm not sure I understand foldenable or foldlevel. I left it at 0 because, as best I understood what it does, I thought it would make the base state of the folds closed.
setl foldenable
setl foldlevel=0
setl foldcolumn=2
Thanks again,
------------------------------------------------------------------------------------------
Eric Weir
Decatur, GA USA
eeweir@bellsouth.net
--
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