ed_6 wrote: ↑
Feb 06, 2021
So why in the world would UltraEdit hard code <%
as ASP with no way to alter that behavior?
I am not an employee of IDM Computer Solutions, Inc and therefore cannot answer that question. I can only share my suppositions.
Multi-language syntax highlighting for HTML was introduced with UltraEdit for Windows v11.00 released January (or February) 2005. HTML 4.01, CSS 2.1 and ECMAScript Edition 3 were the newest HTML related standards in year 2005. I don't know how many web template engines existed in 2004/2005 and which one was the most popular one. I suppose the most popular was Active Server Pages by Microsoft. UE v11.00 was pretty small in comparison to UE v28.00. The files in program files folder of UE v11.00 require just 10,75 MB on disk space. There was a lot hard-coded which is nowadays more flexible coded as the computers were much slower 15 years ago.
In the last 15 years lots of things changed regarding to web design. Static HTML pages became rare nowadays (unfortunately in my opinion as many websites use server or client based active code although not really necessary if the HTML and CSS files would be well written)
. I found out that there are many server based web templates engines nowadays using multiple languages during the research of the facts before I wrote my previous answer. I was really surprised that there are so many web templates engines nowadays and many using very popular (as very good) Python as interpreter. Further I found out to my surprise that many of the web template engines use also <% %>
to mark the start and end of a block to process by the web template engine. I would not be surprised if product management of UltraEdit at IDM Computer Solutions, Inc is also not aware of those facts like me before 2021-02-05.
I take care of the UltraEdit forums since 2004. I can remember only about two requests about multi-language HTML syntax highlighting regarding to Smarty - see Syntax highlighting wordfile for HTML with smarty keywords?
and Syntax highlighting wordfile for Smarty files with individual brackets
. Smarty uses PHP which is not so problematic as PHP is supported by UltraEdit built-in for multi-language syntax highlighting of HTML files.
I agree with you that it would be a good idea nowadays in year 2021 to extend the multi-language syntax highlighting support of UltraEdit for HTML files with a customizable mapping of start/end tag to a syntax highlighting language after knowing all the facts found out two days ago. Hard-coding the start/end tags and the language mapping for performance reasons should not be necessary anymore nowadays.
I could imagine to add to syntax highlighting wordfile with the language marker HTML_LANG
, which is by default the file html.uew
, one or more L
ap definitions with Perl regular expression search strings in a form like:
Code: Select all
/LMFindStart = "<\?php|<\?"
/LMFindEnd = "\?>|\z"
/LMFindInCmts = no
/LMFindStart = "<%"
/LMFindEnd = "%>"
/LMFindInCmts = no
UltraEdit should not only support those language markers currently supported as listed on help page Syntax Highlighting
, but also new language marker strings added by a user to syntax highlighting wordfiles for being able to map start/end tags in the HTML syntax highlighting wordfile to the appropriate language definitions in other wordfiles.
/LMFindInCmts = no
being the default is for searching for the start/end tags with the Perl regular expression engine also within block and line comments no/yes.
Such a customizable language mapping would be useful not only for HTML files. It could be also useful for other languages like C/C++ source files with Doxygen or PC-Lint/FlexeLint comments to highlight the Doxygen/PC-Lint keywords within the C/C++ block or line comments.
What do you (ed_6
and others) think about my idea for a customizable language mapping? Should I request that as an enhancement with an email to IDM support?