Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
From: pancho horrillo <pancho@pancho.name>
To: Philippe LeCavalier <support@plecavalier.com>
Cc: sup-talk <sup-talk@rubyforge.org>
Subject: Re: [sup-talk] vim text wrapping
Date: Thu, 17 Mar 2011 17:23:58 +0100	[thread overview]
Message-ID: <20110317162358.GA15534@pancho.name> (raw)
In-Reply-To: <1300371571-sup-2777@plc.intranet.plecavalier.com>

On Thu, Mar 17, 2011 at 10:26:51AM -0400, Philippe LeCavalier wrote:
> Hi All.
> 
Hi there.

> This is more of a vim question than it is a sup one but I'm not a
> member of the vim list so I thought I'd ask you guys first.
> 
> Since I don't write very well I always end up making changes while
> re-reading myself. When I edit a line Vim doesn't wrap anymore like it
> did when I first typed the text. So all the lines I've edited aren't
> wrapped like the others. It can make reading my mail challenging at
> times.
> 
For the sake of others:
If you want Vim to fold lines as you newly write them, just run
:set textwidth=72  # set tw=72 for short

If you want Vim to reformat the text when you edit it, just run
:set formatoptions+=a
or add it to your vimrc, etc.

This is explained in Vim help,
:help textwidth
:help ins-textwidth
:help formatoptions
:help fo-table

If you don't want this to happen all the time (as I don't),
you can use the gq operator discretionally.
gq <movement>, e.g.:
gq}     reflow till the end of the paragraph
gqap    reflow the whole paragraph

> Perhaps I'm misunderstanding how to properly edit text in vim?
> 
A minor tweak and you are done.

Hope that it helps.

Happy hacking,

-- 
pancho horrillo

To be conscious that
you are ignorant is a great step
to knowledge.

		Benjamin Disraeli
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk


  parent reply	other threads:[~2011-03-17 17:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-17 14:26 Philippe LeCavalier
2011-03-17 15:14 ` Stanislav Ochotnicky
2011-03-17 15:33 ` Paul Grove
2011-03-17 16:10   ` James Taylor
2011-03-17 15:40 ` Tyberius Prime
2011-03-17 15:52 ` Bruno d'Arcangeli
2011-03-17 16:04 ` Erin Sheldon
2011-03-17 16:05 ` Peter Lewis
2011-03-17 16:12 ` Amadeusz Żołnowski
2011-03-17 16:47   ` Matthieu Rakotojaona
2011-03-17 16:19 ` Ico Doornekamp
2011-03-17 18:14   ` Philippe LeCavalier
2011-03-18 13:56     ` Philippe LeCavalier
2011-03-17 16:23 ` pancho horrillo [this message]
2011-03-17 17:46   ` Bruno d'Arcangeli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110317162358.GA15534@pancho.name \
    --to=pancho@pancho.name \
    --cc=sup-talk@rubyforge.org \
    --cc=support@plecavalier.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox