Re: Autmagically adding new lines when text gets too long

2006-09-29 Thread Georg Dahn
Hi!

--- Jeremy Conlin [EMAIL PROTECTED] wrote:

 I have set textwidth=80 and would like Vim to automatically break a
 line (between words) when the line gets too big.  However, this isn't
 working, Vim doesn't seem to be doing anything different.  Is there
 some other option I need to set?

Just do

:set linebreak

Where the lines are wrapped is determined by the option 'linebreak'.
The default value should be ok.

Best wishes,
Georg








___ 
Yahoo! Photos – NEW, now offering a quality print service from just 7p a photo 
http://uk.photos.yahoo.com


Re: Re: Autmagically adding new lines when text gets too long

2006-09-29 Thread Georg Dahn
Hi!

--- Jeremy Conlin [EMAIL PROTECTED] wrote:
 No, linebreak just *displays* a broken line, I want a *real* broken
 line.  I want Vim to insert EOLs for me.  I thought that is what
 textwidth would do.

Of course, you still have to set 'textwidth', too.

:set textwidth=80
:set linebreak

will do, what you want. The option 'linebreak' does not do any wrapping, but
just determines where Vim will wrap long lines. These breaks can be soft (if
the option 'wrap' is set) or hard (if 'textwidth' or 'wrapmargin' is set).

Just read

:h linebreak
:h textwidth
:h wrapmargin
:h wrap
:h breakat

Best wishes,
Georg







___ 
Yahoo! Photos – NEW, now offering a quality print service from just 7p a photo 
http://uk.photos.yahoo.com


Re: Re: Re: Autmagically adding new lines when text gets too long

2006-09-29 Thread Jeremy Conlin

On 9/29/06, Georg Dahn [EMAIL PROTECTED] wrote:

Hi!

--- Jeremy Conlin [EMAIL PROTECTED] wrote:
 No, linebreak just *displays* a broken line, I want a *real* broken
 line.  I want Vim to insert EOLs for me.  I thought that is what
 textwidth would do.

Of course, you still have to set 'textwidth', too.

:set textwidth=80
:set linebreak

will do, what you want. The option 'linebreak' does not do any wrapping, but
just determines where Vim will wrap long lines. These breaks can be soft (if
the option 'wrap' is set) or hard (if 'textwidth' or 'wrapmargin' is set).

Just read

:h linebreak
:h textwidth
:h wrapmargin
:h wrap
:h breakat

Best wishes,
Georg


You were right (of course).  I discovered the reason this was not
working for me was because I didn't have the t option in
formatoptions.  Now that I have included that, it works!
Thanks for your patience.
Jeremy


Re: Autmagically adding new lines when text gets too long

2006-09-29 Thread A.J.Mechelynck

Jeremy Conlin wrote:

I have set textwidth=80 and would like Vim to automatically break a
line (between words) when the line gets too big.  However, this isn't
working, Vim doesn't seem to be doing anything different.  Is there
some other option I need to set?
Thanks,
Jeremy



With 'textwidth' set to 80, Vim should insert a hard line break after the 
rightmost space as you type the 81st character on a line.


You can also use variants of the gq commands: gqq to reformat a line, 
Visualgq to reformat the Visual area, gqap to regormat a paragraph, gggqG to 
reformat the whole file.



Best regards,
Tony.