[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sup-talk] vim text wrapping
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