From: Pete Johns <[EMAIL PROTECTED]>
Subject: Re: Two """problems"""
Date: Fri, 15 Sep 2006 14:19:22 +1000
<snip>
...
<snip>
Hi Pete,
...please check this with your genious vimly mind... :) <<<-- BIG smiley!
Your initial command set was:
1,$g/.\{73,}/normal v}gq
Which does -- if I understand correctly in the meantime -- find any
more-than-72chars-long line and reformats it.
But if there is a text like this:
Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very
Very long line
fun! Thisscript()
"does nothing special
endfunction
become this:
Very Very Very Very Very Very Very Very Very Very Very Very Very Very
Very Very Very long line fun! Thisscript() "does nothing special
endfunction
(I am still writing my mail with emacs and mew, since I haven't found
an equal replacement for that, so reformatting is not truely done
with your comamnd but with emacs Alt-Q command...)
due to the final "}" in the command set -- it jumps behind the
"endfunction" in this case.
But I only want to reformat the longish line. The result should be
this:
Very Very Very Very Very Very Very Very Very Very Very Very Very Very
Very Very Very long line
fun! Thisscript()
"does nothing special
endfunction
Would it help to change the command set to
1,$g/.\{73,}/normal v$gq
????
Have a nice weekend !
mcc