Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
From: James Taylor <james@jamestaylor.org>
To: sup-talk <sup-talk@rubyforge.org>
Subject: Re: [sup-talk] vim text wrapping
Date: Thu, 17 Mar 2011 12:10:57 -0400	[thread overview]
Message-ID: <9C855374-896D-4D31-860E-A9160595914F@jamestaylor.org> (raw)
In-Reply-To: <1300375966-sup-3846@localhost>

I use gqap constantly while writing email and other prose in vim.

(:help gq gives you the following)

"""
gqgq                                                    gqgq gqq
gqq                     Format the current line.  With a count format that
                        many lines.  {not in Vi}

                                                        v_gq
{Visual}gq              Format the highlighted text.  (for {Visual} see
                        Visual-mode).  {not in Vi}

                                                        gw
gw{motion}              Format the lines that {motion} moves over.  Similar to
                        gq but puts the cursor back at the same position in
                        the text.  However, 'formatprg' and 'formatexpr' are
                        not used.  {not in Vi}

gwgw                                                    gwgw gww
gww                     Format the current line as with "gw".  {not in Vi}

                                                        v_gw
{Visual}gw              Format the highlighted text as with "gw".  (for
                        {Visual} see Visual-mode).  {not in Vi}

Example: To format the current paragraph use:                   gqap  >
        gqap

The "gq" command leaves the cursor in the line where the motion command takes
the cursor.  This allows you to repeat formatting repeated with ".".  This
works well with "gqj" (format current and next line) and "gq}" (format until
end of paragraph).  Note: When 'formatprg' is set, "gq" leaves the cursor on
the first formatted line (as with using a filter command).

If you want to format the current paragraph and continue where you were, use: >
        gwap
If you always want to keep paragraphs formatted you may want to add the 'a'
flag to 'formatoptions'.  See auto-format.
"""





On Mar 17, 2011, at 11:33 AM, Paul Grove wrote:

> The answer to this question is in my interest also.
> 
> Excerpts from Philippe LeCavalier's message of Thu Mar 17 14:26:51 +0000 2011:
>> Hi All.
>> 
>> 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.
>> 
>> Perhaps I'm misunderstanding how to properly edit text in vim?
>> 
> _______________________________________________
> sup-talk mailing list
> sup-talk@rubyforge.org
> http://rubyforge.org/mailman/listinfo/sup-talk

-- jt

James Taylor, Assistant Professor, Biology / Computer Science, Emory University




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


  reply	other threads:[~2011-03-17 16:54 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 [this message]
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
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=9C855374-896D-4D31-860E-A9160595914F@jamestaylor.org \
    --to=james@jamestaylor.org \
    --cc=sup-talk@rubyforge.org \
    /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