On 2006-08-18, cga2000 <[EMAIL PROTECTED]> wrote:

> I there a way I can enter effortlessly stuff like the following:
> 
> 1. this is a numbered paragraph several lines long and I would like all
> lines aligned with the "this" which starts in column 4.  I don't know if
> it's good typography but I use these numbered lists a lot and with the
> text aligned I think it looks better.
> 
> .. and format it like this:
> 
> 1. this is a numbered paragraph several lines long and I would like all
>    lines aligned with the "this" which starts in column 4.  I don't know 
>    if it's good typography but I use these numbered lists a lot and with
>    the text aligned I think it looks better.
> 
> .. or possibly make Vim indent this automatically when typing..?
> 
> I mean that I usually have a textwidth of 72 and Vim automatically wraps
> to line 2 after I have written the "all" at the end of line 1 .. but
> obviously Vim has no reason to indent and therefore starts line 2 and
> the following lines in column 1. 
> 
> Is there any way I can tell Vim that when line 1 starts with a number
> followed by a dot '.' .. the following lines should be indented so that
> all the text is aligned.
> 
> Not simple .. I guess .. since this could move into double digits (or
> more..) -- there could be more than nine numbered paragraphs and text
> should start in column 5 (or 6..).
> 
> Or maybe somone has written a script that can convert a bunch of
> paragraphs into something like a numbered (or bulleted) list?

For numbered lists,

    set fo+=n

For bulleted lists using '-',

    set com+=fb:-

or '*',

    set com+=fb:*

but those should already be part of the default 'comments' option
unless you have changed it.  (Odd that numbered lists and bulleted
lists use different options.)
See

    :help 'fo'
    :help 'com'

I also have '2' as part of my 'formatoptions' string.  I don't think
it affects lists, but you might try it if those other settings don't
work as you'd like them to.

Regards,
Gary

-- 
Gary Johnson                 | Agilent Technologies
[EMAIL PROTECTED]     | Wireless Division
                             | Spokane, Washington, USA

Reply via email to