sponsor Vim development Vim logo Vim Book Ad

gq : Multipurpose e-mail message beautifier

 script karma  Rating 16/17, Downloaded by 995  Comments, bugs, improvements  Vim wiki

created by
Klaus Bosau
 
script type
utility
 
description
gq.vim provides shortcut "q", a variant on Vim's built-in beautifier
"gq" with enhanced e-mail support. Use it just as you'd use "gq" when
in Visual mode. - Features:

- It's capable of dealing with lists being part of quotations.
   (Vim's 'comments' engine "gq" depends on can't do this.)
- Quote marks may appear in conjunction with enclosed initials
   denoting the author's name.
- It can perform basic tasks on malformed quoting-markup. (remove
   enclosed whitespace, reposition initials, convert badly wrapped
   lines)
- It's configurable. (Have a look at gq.vim to see how this can be
   accomplished..)

A quote sample to illustrate how it works..

  > AB> > 1. qtqt qtqtq. qtqtqt qtqtqt qtqtq tqtqt tqqtt qtqt qtqt.
  > >AB > 2. qtqt qtqtq. qtqtqt qtqtqt qtqtq tqtqt tqqtt qtqt qtqt.
  >CD > - qtqt qtqtq qtqtqt qtqtqt qtqtq, tqtqt tqqtt qtqt qtqt.
  > CD> * qtqt qtqtq qtqtqt qtqtqt qtqtq, tqtqt tqqtt qtqt qtqt.
  > qtqt qtqtq qtqtqt. qtqtqt qtqtq tqtqt, tqqtt qtqt qtqt qtqt qt
  qtqt qtqtqt.


"Vipgq" (:setl fo=tcrqn ai com=n:>,fb:-,fb:* tw=36):

  > AB> > 1. qtqt qtqtq. qtqtqt
  > qtqtqt qtqtq tqtqt tqqtt qtqt
  > qtqt.
  > >AB > 2. qtqt qtqtq. qtqtqt
  > >qtqtqt qtqtq tqtqt tqqtt qtqt
  > >qtqt.
  >CD > - qtqt qtqtq qtqtqt qtqtqt
  >qtqtq, tqtqt tqqtt qtqt qtqt.
  >CD> * qtqt qtqtq qtqtqt qtqtqt
  >qtqtq, tqtqt tqqtt qtqt qtqt.
  >qtqt qtqtq qtqtqt. qtqtqt qtqtq
  >tqtqt, tqqtt qtqt qtqt qtqt qt
  qtqt qtqtqt.


"Vipgq" (:setl fo=tcrqn ai com=n:>,fb:-,fb:*,n:A,n:B,n:C,n:D tw=36):

  > AB> > 1. qtqt qtqtq. qtqtqt
  > AB> > qtqtqt qtqtq tqtqt tqqtt
  > AB> > qtqt qtqt.
  > >AB > 2. qtqt qtqtq. qtqtqt
  > >AB > qtqtqt qtqtq tqtqt tqqtt
  > >AB > qtqt qtqt.
  >CD > - qtqt qtqtq qtqtqt qtqtqt
  >CD > qtqtq, tqtqt tqqtt qtqt
  >CD > qtqt.
  > CD> * qtqt qtqtq qtqtqt qtqtqt
  > CD> qtqtq, tqtqt tqqtt qtqt
  > CD> qtqt.
  > qtqt qtqtq qtqtqt. qtqtqt qtqtq
  > tqtqt, tqqtt qtqt qtqt qtqt qt
  qtqt qtqtqt.


"Vipq" (:setl fo=tcqn ai com=n:>,fb:-,fb:* tw=36):

  AB>>> 1. qtqt qtqtq. qtqtqt qtqtqt
  AB>>>    qtqtq tqtqt tqqtt qtqt
  AB>>>    qtqt.
  AB>>> 2. qtqt qtqtq. qtqtqt qtqtqt
  AB>>>    qtqtq tqtqt tqqtt qtqt
  AB>>>    qtqt.
  CD>> - qtqt qtqtq qtqtqt qtqtqt
  CD>>   qtqtq, tqtqt tqqtt qtqt
  CD>>   qtqt.
  CD>> * qtqt qtqtq qtqtqt qtqtqt
  CD>>   qtqtq, tqtqt tqqtt qtqt
  CD>>   qtqt.
  > qtqt qtqtq qtqtqt. qtqtqt qtqtq
  > tqtqt, tqqtt qtqt qtqt qtqt qt
  > qtqt qtqtqt.
 
install details
Copy gq.vim to your plugin directory (see ":h add-global-plugin") or,
alternatively, issue ":so gq.vim" prior to composing (for details see
":h load-vim-script").
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
gq.vim 0.91 2004-04-24 6.0 Klaus Bosau Just separated the markup engine. You may use ",r" or ":requote" now to fix up bad quoting for the whole file while keeping lines as long as they initially were.
gq.vim 0.9 2003-11-25 6.0 Klaus Bosau Initial upload
ip used for rating: 18.218.184.214

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github