Paragraph reformat
Posted: Wed May 03, 2006 1:18 pm
I'm new to Textpad...
I'm trying to make a macro that behaves a bit as EditReformat.
What I actually want is (a) replace all multiple white space in a paragraph with one space except for the initial white space at the start of the first line and (b) reformat that text to the right margin as specified by wordwrap at most but with the left margin using the indent (tabs and spaces) of the first line.
Thus (using . for a space and ---- for a tab)
Before:
----..The.quick..brown.
fox.jumps....over----the..----lazy
dog
After
----..The.quick.brown.fox
----..jumps.over.the.lazy
----..dog
Any suggestions? I'd like it to work on documents where a paragraph already has hard lineends, thus a para-end is a blank line.
Thanks.
===sgb
I'm trying to make a macro that behaves a bit as EditReformat.
What I actually want is (a) replace all multiple white space in a paragraph with one space except for the initial white space at the start of the first line and (b) reformat that text to the right margin as specified by wordwrap at most but with the left margin using the indent (tabs and spaces) of the first line.
Thus (using . for a space and ---- for a tab)
Before:
----..The.quick..brown.
fox.jumps....over----the..----lazy
dog
After
----..The.quick.brown.fox
----..jumps.over.the.lazy
----..dog
Any suggestions? I'd like it to work on documents where a paragraph already has hard lineends, thus a para-end is a blank line.
Thanks.
===sgb