On Thu, Dec 4, 2008 at 2:26 PM, Cory Echols wrote:
>
> I'm trying to get numbered lists to format in code comments similar to
> how they format in plain text:
>
> // 1.  Similar to this formatted
> //     list in this paragraph.
>
> I have the following settings:
>
> formatoptions=croqln
> comments=://
> formatlistpat=^\s*\d\+[\]:.)}\t ]\s*
>
> These options are not working.  The second line of the numbered item
> is beginning directly underneath the '1'.

The problem is that the pattern /^\s*\d\+[\]:.)}\t ]\s*/ doesn't match
'// 1.  Similar to this formatted' - the leading comment characters
confuse it.

:let &flp='^\s*\%(\/[\/*]\s*\)\=\d\+[\]:.)}\t ]\s*'

does a better job, but still messes up:

// 1. Similar to this formatted list in
      // this paragraph

This is as far as I can get with it at the moment... someone else
might know more about it and be able to take it from there...

~Matt

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to