Code beautifiers, anyone?

Giorgos Keramidas keramida at ceid.upatras.gr
Fri Aug 25 17:31:57 UTC 2006


On 2006-08-25 15:24, Kyrre Nyg?rd <kyrreny at broadpark.no> wrote:
> At 21:09 24.08.2006, Matti J. Karki wrote:
> 
> >Well, my scripts aren't magic. They are pretty simple. Here's few (not
> >scripts, these are valid Vim regexps):
> 
> Those are great regexps, Matti, thank you so much.
> 
> They have been noteworthy recorded!
> 
> Say, could I use these with Sed let's say in a Bash script?
> 
> One more question about :%s/^ *$//g versus :%s/ *$//g,
> won't the latter here perform the job of the former?

They are different for a reason, I guess:

The first one matches lines that only have spaces (it fails
spectacularly with lines that have a mix of TAB vs. SPACE characters
though, unless you pre-expand TABs).

The second one only removes trailing SPACEs from a line.



More information about the freebsd-questions mailing list