Reply to message «Re: Reformatting numbered lists [Was: formatlistpat escape 
\]», 
sent 16:14:26 15 March 2011, Tuesday
by Ben Schmidt:

> You actually shouldn't include the double quotes when using the :set
> command. Try without them!
> 
>     :set flp=^\\s*\\(\\d\\\|\\a\\)\\+\\.\\s*
Or use let:
    :let &flp='^\s*\(\d\|\a\)\+\.\s*'
: this does not require so much backslashes.

Original message:
> On 15/03/11 11:17 PM, Erik Christiansen wrote:
> > On Thu, Mar 03, 2011 at 08:44:37PM -0800, Bee wrote:
> >> 'formatlistpat' 'flp'    string (default: "^\s*\d\+[\]:.)}\t ]\s*")
> > 
> > ...
> > 
> >> must do this:
> >> ^\\s*\\(\\d\\\|\\a\\)\\+\\.\\s*
> > 
> > ...
> > 
> >> With  :set tw=64  it works great as follows:
> > Where might I read on how to emulate that super-nifty hierarchical
> > 
> > numbered list indenting? i.e.:
> >>   1. Lorem ipsum dolor sit amet, consectetur adipisicing:
> >>      a. Lorem ipsum dolor sit amet, consectetur adipisicing elit,
> >>      
> >>         sed do eiusmod tempor incididunt ut labore et dolore
> >>         magna aliqua. Ut enim ad minim veniam, quis nostrud
> >>         exercitation ullamco.  OR
> >>      
> >>      b. Lorem ipsum dolor sit amet, consectetur adipisicing elit,
> >>      
> >>         sed do eiusmod tempor incididunt ut labore et dolore
> >>         magna aliqua. Ut enim ad minim.
> >>   
> >>   2. Lorem ipsum dolor sit amet, consectetur adipisicing elit,
> >>   
> >>      sed do eiusmod tempor incididunt ut labore et dolore magna
> >>      aliqua. Ut enim ad minim veniam, quis nostrud exercitation.
> > 
> > Simply trying :set flp="^\\s*\\(\\d\\\|\\a\\)\\+\\.\\s*" just mashed
> > everything together when I used gq}. The alternative single quoted
> > shorter alternative did the same.
> 
> You actually shouldn't include the double quotes when using the :set
> command. Try without them!
> 
>     :set flp=^\\s*\\(\\d\\\|\\a\\)\\+\\.\\s*
> 
> (Untested.)
> 
> Ben.

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to