Saturday, June 18, 2011

Re: Exasperated with folding

On Jun 18, 2011, at 6:03 PM, Vlad Irnov wrote:

> Vim 7.3 has support for Markdown by default. You just need to set
> buffer 'filetype' to "markdown". MultiMarkdown and other dialects are
> very similar, there is no need to create a new filetype.

Great! Thanks a ton for bringing this to my attention, Vlad.

> Folding for markdown is not set up by default, you have to add it
> yourself:

And thanks, especially for the markdown folding script. Never coulda come up with anything like that on my own.

I've checked and done everything you said to do, except for the fold-options, which I'll check out later. Time for dinner right now.

> You may need to create folders /.vim or /vimfiles, /after, /after/
> ftplugin first.

I have /.vim, /after, and /after/plugin. No /vimfiles.

> 2) Copy the following code into it. WARNING: long lines may get split
> during posting.

With that in mind I'm uncertain whether the line below should wrap, i.e., whether the stuff in parens should be on a second line.

> " this is one line
> setl foldtext=getline(v:foldstart).'\ \ \ /'.v:foldlevel.'...'.
> (v:foldend-v:foldstart)
>
> ....
>
> To test, try it on some real and complex Markdown file, for example
> save this file
> https://raw.github.com/fletcher/peg-multimarkdown/master/README.markdown
> and open it in Vim. You should get syntax hi and folding.

I'm familiar with this document, but never in Vim with syntax highlighting on.

> To try VOoM plugin with Markdown execute the command
> :Voom markdown

I'll do that, too. I'll I need to install it first, though.

Thanks again, . This does several things for me -- solve my folding problem, set me up for markdown and multimarkdown in Vim, and -- hopefully -- provide me with "outlining" capabilities that are a little more intuitive to me.

Sincerely,
------------------------------------------------------------------------------------------
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: