On Tue, May 1, 2007 12:55 pm, Robert Cummings wrote:
>> Are there perhaps editors that would DISPLAY multi-line quoted
>> strings
>> "indented" to the correct level without inserting extra spaces? Some
>> editors wrap lines to the correct level, which is also much more
>> readable, so what I'm thinking of is a bit similar to that.
>
> Then you'd have an editor that presents something other than what is
> actually there. Go see Microsoft, I'm sure they create rubbish like
> that.

All editors display something other than what is actually there, to
some degree... :-)

That said...

The problem with the editor auto-indenting lines that aren't indented
is what to do with lines that ARE indented...

True Source:
        $email = EOM
      This is a paragraph that has been indented and
hard line-wrapped with something not unlike:
<http://php.net/wordwrap>
http://php.net/wordwrap
and has had URLs embedded in ways to make sure ALL
email clients will present at least ONE clickable link,
even the dreaded AOL 4.0
      Yes, I still have code that is hanging around
from when AOL 4.0 was "new".
      Sorry.
EOM;

So what would your nifty editor do with that?

Indent it to match PHP indenting, and then add the whitespace of the
actual message?

I think that might "work" well, though lead to a lot of un-readable
right-shifted long text lines instead of the "ugly" indentation.

One think you could consider to avoid the ugliness is to put the
heredoc into a one-use function or in an incldue file that doesn't
have enough indenting for it to look ugly in the first place. :-)

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to