CodeLobster IDE
http://codelobster.com/forum/

Editor text-formating in PHP heredoc
http://codelobster.com/forum/viewtopic.php?f=2&t=24009
Page 1 of 1

Author:  Alan Hope [ Wed Nov 01, 2017 9:07 am ]
Post subject:  Editor text-formating in PHP heredoc

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

Author:  Alan Hope [ Sat Nov 04, 2017 2:19 am ]
Post subject:  Re: Editor text-formating in PHP heredoc

OK.
Codelobster almost won me over, but that's me back (for now) to Atom + a handful of Plugins.
Cheers for a top effort, guys.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/