On 2006-08-19, cga2000 <[EMAIL PROTECTED]> wrote:
> On Sat, Aug 19, 2006 at 12:15:10AM EDT, Gary Johnson wrote:
> > On 2006-08-18, cga2000 <[EMAIL PROTECTED]> wrote:
> >
> [help creating numbered and bulleted lists in Vim]
> >
> > 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.
> >
> Looks very promising.
>
> I'm three hours behind/ahead of you (EST) .. so it's bedtime for me ..
It's getting late here, too, but I just got a new Windows PC and two
new flat-panel monitors that I share between the Windows PC and my
Linux PC, so I'm trying to get everything configured the way I want.
> Main thing that I have to figure out is a simple way to get back to
> column 1 when starting a new list item. When I am done entering item
> #1, I need to type "2." in columns 1 and 2 and if I just hit enter to
> start a new line, Vim jumps to column 4. So I escape back to command
> mode .. Vim moves the cursor to column 1 .. I hit "i" ..
Just hit Ctrl-D after the enter that finishes the item. Actually,
you can hit Ctrl-D any time while you're typing the next numbered
line. That will move the line one shift-width to the left, just as
'<<' does in normal mode.
> Also, I created a ten-item list and the text in item #10 and items #1
> to #9 is not aligned. So I select the column that has the space that
> separated 1. .. 2. .. from the text <Ctrl-V> .. yank it .. and hit "p"
> causing Vim to indent the text in items 1-9 by an additional column.
> Need to check the help files .. see if there's a better way.
I usually usually use Ctrl-V to select the first column of text,
then type 'I' and a space and <Esc>. Your method is slightly
better, as long as you're not using tabs and a deeply-indented list.
> Lastly.. I need to check what happens with fo+=a .. see if this plays
> well with automatic formatting of paragraphs. Hopefully Vim will
> reflow text without losing track of the list indent.
It seems to work well most of the time, but there are a few cases
where it doesn't, notably when a sentence ends in a number, such as
a year or a model number, and that number wraps to the start of the
next line. Then vim insists on indenting the line following that
number as though the number was a list item. Like this, assuming a
narrow 'textwidth':
Columbus sailed the ocean blue in
1492. Then some more text just to
fill in the line.
Consequently, I never include 'n' and 'aw' in 'fo' at the same time.
> Thank you very much..!!!!
You're most welcome.
Regards,
Gary
--
Gary Johnson | Agilent Technologies
[EMAIL PROTECTED] | Wireless Division
| Spokane, Washington, USA