From: Pete Johns <[EMAIL PROTECTED]>
Subject: Re: Two """problems"""
Date: Fri, 15 Sep 2006 14:19:22 +1000
Hi Pete !
Thank you for "disassembling" the hex into mnemonics! :O)
One question remains in my head:
if /.\{73,}/ find all lines, for what is the "g" for?
I mean...more than finding the whole line in the whole line make
no sense to me (and obviously "only to me" ;) ...
Vim - the text assemble ;)))
Keep hacking!
mcc
> On Fri, 2006-09-15 at 04:57:24 +0200, Meino Christian Cramer sent:
> >Hi Pete!
> >
> Hi!
>
>
> >thank you very much for this "line of code" -- works like a
> >charme!
> >
> Delighted to hear it.
>
>
> >The only """bad""" thing is: I dont understand completly, how it
> >works....
> >
> He he... I'm glad that someone's taken this apart :-)
>
> >1,$ for the beginning of the text til its end do
> >
> And there's a 'g'...
>
>
> >/.\{73,}/ find all lines longer than 72 chars and for each do
> >
> Yup.
>
>
> >normal ??? go into normal mode ???
> > v ????? visual mode (and for what is the " " good for?)
> > ????
> >
> normalv}gq isn't an editor command, so you have to split 'normal'
> and 'v'. There may be a better way of doing this.
>
>
> >}gq ???????? only white noise for me....a C-programme I
> >would say, that there is on "}" too many in the whole expression
> >but simultaneously I know, that I am wrong.....???????????
> >
> } is a motion: it moves one paragraph forward.
>
> See :help }
>
> gq formats the highlighted lines.
>
> See :he gq
>
> There are other ways of solving this problem, I am sure, but I
> like the way this works because it leaves paragraphs alone that
> are shorter then 73 characters wide, rather than expanding them.
>
> Cheers;
>
>
>
> --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>
>