Re: [gentoo-user] {OT} vi line breaks

2006-08-06 Thread Justin R Findlay
On Sat, Aug 05, 2006 at 04:25:09PM -0700, Grant wrote:
 This worked great for plain vi, but the problem persists with mutt.
 Any suggestions for mutt?

This is my mutt editor command.  Suit it to your desires, although I
reccommend keeping the line breaks unless you know of a way to get mutt
to format the outgoing mail with line breaks instead of having vim do it
in line as it gets kind of tedious reformating the text when you have a
difficult email to write. (:

But even on this account I may be able to offer some knowledge.  When
you need to reformat some text just select the text with ctrl-v or
shift-v or 'v' and do 'gq'.

$ grep editor ~/.muttrc
set editor=vim +/^$ -c 'set linebreak ft=mail'


Justin
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] {OT} vi line breaks

2006-08-06 Thread Grant

 This worked great for plain vi, but the problem persists with mutt.
 Any suggestions for mutt?

This is my mutt editor command.  Suit it to your desires, although I
reccommend keeping the line breaks unless you know of a way to get mutt
to format the outgoing mail with line breaks instead of having vim do it
in line as it gets kind of tedious reformating the text when you have a
difficult email to write. (:


Why would you want automatic line breaks in your email though?  Won't
every email client wrap text at an appropriate point for viewing?


But even on this account I may be able to offer some knowledge.  When
you need to reformat some text just select the text with ctrl-v or
shift-v or 'v' and do 'gq'.

$ grep editor ~/.muttrc
set editor=vim +/^$ -c 'set linebreak ft=mail'


I tried the following to stop mutt from adding line breaks but it doesn't work:

set editor=vim -c 'set nolinebreak'

Can you help me fix that?

- Grant
--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] {OT} vi line breaks

2006-08-06 Thread Willie Wong
On Sun, Aug 06, 2006 at 07:33:39AM -0700, Penguin Lover Grant squawked:
 $ grep editor ~/.muttrc
 set editor=vim +/^$ -c 'set linebreak ft=mail'
 
 I tried the following to stop mutt from adding line breaks but it doesn't 
 work:
 
 set editor=vim -c 'set nolinebreak'

See my other email for the difference between linebreak and textwidth.
From what I read of your preference, it sounds like you want to turn
off textwidth (set it to 0) and keep linebreak. 

W
-- 
As long as the universe is much greater than 1, we can safely say
that this term is zero.
   ~Prof. Kirk T. McDonald, DeathEM, P-town PHY 304
Sortir en Pantoufles: up 11 days, 13 min
-- 
gentoo-user@gentoo.org mailing list



[gentoo-user] {OT} vi line breaks

2006-08-05 Thread Grant

Does anyone know how to prevent vi from inserting a line break after
every however many characters?

- Grant
--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] {OT} vi line breaks

2006-08-05 Thread Alexander Skwar

Grant schrieb:

Does anyone know how to prevent vi from inserting a line break after
every however many characters?


Hm. How did you enable that in the first place?

You might want to check your /etc/vim/* and ~/.vim* files.

Alexander Skwar
--
Audience: What will become of Linux when the Hurd is ready?
Eric Youngdale: Err... is Richard Stallman here?
-- From the Linux conference in spring '95, Berlin
--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] {OT} vi line breaks

2006-08-05 Thread Richard Fish

On 8/5/06, Grant [EMAIL PROTECTED] wrote:

Does anyone know how to prevent vi from inserting a line break after
every however many characters?


Is it actually inserting line breaks?  Or just wrapping long lines for display?

If actually inserting line breaks, then you have textwidth set
somewhere.  You can turn it of with:

:set textwidth 0

If it is just for display:

:set nowrap

BTW, :help will give you the built-in help system.

Of course, there is also a method of fixing this in bash.

alias vi=kedit

:-)

-Richard
--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] {OT} vi line breaks

2006-08-05 Thread Justin R Findlay
On Sat, Aug 05, 2006 at 02:19:41PM -0700, Grant wrote:
 Does anyone know how to prevent vi from inserting a line break after
 every however many characters?

:set nolinebreak

echo set nolinebreak  ~/.vimrc


Justin
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] {OT} vi line breaks

2006-08-05 Thread Mark

Look for:
set textwidth=

Or shorthand:
set tw=...

If you set this to 0 .. then it will not wrap. You can do this on a
per file basis with the vim modelines:

# vim:set tw=0:

As suggested look in the rc files.

Thanks
Mark
--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] {OT} vi line breaks

2006-08-05 Thread Rick van Hattem
On Saturday 05 August 2006 23:19, Grant wrote:
 Does anyone know how to prevent vi from inserting a line break after
 every however many characters?

 - Grant
vi doesn't do that on default, perhaps you mean line wrapping?
If so, set nowrap should fix it :)

Put it in your ~/.vimrc to make it default

-- 
Rick van Hattem Rick.van.Hattem(at)Fawo.nl


pgpu1e9aDNUdY.pgp
Description: PGP signature


Re: [gentoo-user] {OT} vi line breaks

2006-08-05 Thread Michael Sullivan
On Sat, 2006-08-05 at 23:41 +0200, Alexander Skwar wrote:
 Grant schrieb:
  Does anyone know how to prevent vi from inserting a line break after
  every however many characters?
 
 Hm. How did you enable that in the first place?
 
 You might want to check your /etc/vim/* and ~/.vim* files.
 
 Alexander Skwar
 -- 
 Audience: What will become of Linux when the Hurd is ready?
 Eric Youngdale: Err... is Richard Stallman here?
   -- From the Linux conference in spring '95, Berlin

First of all, are you sure that it's actually a line break and not a
line wrap?  Find a line of text that seems to take up multiple lines.
Go to the beginning of that line and hit the End key.  If the cursor
jumps to another line, you know it's a line wrap, and it can be turned
off with set nowrap.

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] {OT} vi line breaks

2006-08-05 Thread Grant

 Does anyone know how to prevent vi from inserting a line break after
 every however many characters?

:set nolinebreak

echo set nolinebreak  ~/.vimrc


Yes!  Freedom!  Thank you everyone.

- Grant
--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] {OT} vi line breaks

2006-08-05 Thread Grant

 Does anyone know how to prevent vi from inserting a line break after
 every however many characters?

 - Grant
vi doesn't do that on default, perhaps you mean line wrapping?
If so, set nowrap should fix it :)


nolinebreak actually fixed it.  Does anyone know why vi might be
inserting line breaks by default?  This is happening on my laptop and
server for all users.  I've never configured vi whatsoever.

- Grant
--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] {OT} vi line breaks

2006-08-05 Thread Grant

 Does anyone know how to prevent vi from inserting a line break after
 every however many characters?

:set nolinebreak

echo set nolinebreak  ~/.vimrc


This worked great for plain vi, but the problem persists with mutt.
Any suggestions for mutt?

- Grant
--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] {OT} vi line breaks

2006-08-05 Thread Meino Christian Cramer
From: Richard Fish [EMAIL PROTECTED]
Subject: Re: [gentoo-user] {OT} vi line breaks
Date: Sat, 5 Aug 2006 14:48:53 -0700


Hi,

 I have kinda reverse question to this vi/vim problem: I am using
 vim as vim (not in compatible mode). 

 When writing normal text in Emacs or loading normal text into emacs
 there was the possibility to reformat paragraphs wirh
 fill-paragraphs (ALT-Q) so there were linebreaks inserted and
 removed to make the paragraph fit best into the previously defined
 width of the line.

 I cannot find this functionality in vim...is there anything like
 that?

 Kind regards,
 mcc

 



 On 8/5/06, Grant [EMAIL PROTECTED] wrote:
  Does anyone know how to prevent vi from inserting a line break after
  every however many characters?
 
 Is it actually inserting line breaks?  Or just wrapping long lines for 
 display?
 
 If actually inserting line breaks, then you have textwidth set
 somewhere.  You can turn it of with:
 
 :set textwidth 0
 
 If it is just for display:
 
 :set nowrap
 
 BTW, :help will give you the built-in help system.
 
 Of course, there is also a method of fixing this in bash.
 
 alias vi=kedit
 
 :-)
 
 -Richard
 -- 
 gentoo-user@gentoo.org mailing list
 
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] {OT} vi line breaks

2006-08-05 Thread Philip Webb
060806 Meino Christian Cramer wrote:
 When writing normal text in Emacs or loading normal text into emacs
 one could reformat paragraphs with fill-paragraphs (ALT-Q)
 so there were linebreaks inserted and removed
 to make the paragraph fit best into the previously defined line width.
 I cannot find this functionality in vim: is there anything like that?

Do you mean ':set lbr' ?

-- 
,,
SUPPORT ___//___,  Philip Webb : [EMAIL PROTECTED]
ELECTRIC   /] [] [] [] [] []|  Centre for Urban  Community Studies
TRANSIT`-O--O---'  University of Toronto
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] {OT} vi line breaks

2006-08-05 Thread Willie Wong
On Sun, Aug 06, 2006 at 04:01:57AM +0200, Penguin Lover Meino Christian Cramer 
squawked:
  When writing normal text in Emacs or loading normal text into emacs
  there was the possibility to reformat paragraphs wirh
  fill-paragraphs (ALT-Q) so there were linebreaks inserted and
  removed to make the paragraph fit best into the previously defined
  width of the line.
 
  I cannot find this functionality in vim...is there anything like
  that?

From user_10.txt of the vim help manual:

===begin quote
Now lines will be broken to take only up to 72 characters.  But when you
insert text halfway a line, or when you delete a few words, the lines will get
too long or too short.  Vim doesn't automatically reformat the text.
   To tell Vim to format the current paragraph: 

gqap

This starts with the gq command, which is an operator.  Following is ap,
the text object that stands for a paragraph.  A paragraph is separated from
the next paragraph by an empty line.

Note:
A blank line, which contains white space, does NOT separate
paragraphs.  This is hard to notice!

Instead of ap you could use any motion or text object.  If your paragraphs
are properly separated, you can use this command to format the whole file: 

gggqG

gg takes you to the first line, gq is the format operator and G the
motion that jumps to the last line.

In case your paragraphs aren't clearly defined, you can format just the lines
you manually select.  Move the cursor to the first line you want to format.
Start with the command gqj.  This formats the current line and the one below
it.  If the first line was short, words from the next line will be appended.
If it was too long, words will be moved to the next line.  The cursor moves to
the second line.  Now you can use . to repeat the command.  Keep doing this
until you are at the end of the text you want to format.
==end quote===

HTH, 

W
-- 
When cryptography is outlawed,
bayl bhgynjf jvyy unir cevinpl.
Sortir en Pantoufles: up 10 days,  5:22
-- 
gentoo-user@gentoo.org mailing list