On Thu, 2006-09-14 at 04:45:12 +0200, Meino Christian Cramer sent: >2.) Currently I am reading the ascii version of the vimtips >file. One thing I would like to change physically (that means: >The file should be changed that way, not only the visual >representation...) are the super long lines into 72 chars ones. >My attempt to do this was > > gqG > > which reformats /everything/ (even the embedded scripts). As > long as it was floating text, the result was ok, but the > scripts were """obfuscated""". > > I would like to apply the gq-command only to lines longer than > 72 chars -- so the scripts were automagically skipped (as I > hope...). > > How can I accomplish this ? > Here's my attempt:
""""" For all lines longer than 72 characters, reformat the """"" paragraph from that line.. 1,$g/.\{73,}/normal v}gq Hope this helps; --paj -- Pete Johns <http://johnsy.com/> Contact Information <http://johnsy.com/contact/> More On OptusNet <http://johnsy.com/20060912132225> dsc00220 <http://johnsy.com/albums/flickr/210370644>
pgpFwLXIBScF6.pgp
Description: PGP signature