A request for editor code formatting within the PHP heredoc structure. This is anothger feature I miss from other editors.
PHP heredocs are widely used to output blocks of code and are useful because they handle multiple lines, tags, and single and double quotemarks well and can have embedded variables. They can represent large chunks of code with many lines.
Most coders format these with a label indicating the type of code within the heredoc: eg
$my_big_html_page=<<<HTML <h1>My header</h1> <p> Some paragraph text </p> HTML;
or
$my_sql_statement=<<<SQL SELECT * FROM {$databasetable} WHERE ...etc SQL;
My request is that the bounding identifiers (eg above would be HTML and SQL) be identified by the code editor, and the formatting colour rules for that type of code applied to the whole block. Currently in Codelobster all the code in a PHP heredoc is simply displayed as a single coloured block using the text colour for a string variable.
I'm hoping this isn't too hard to implement. The formatting rules are all there, just need to be applied within the heredoc.
Cheers, Alan
|