<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://community.activestate.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>ActiveState Community Site - Changing HTML script colors - Comments</title>
 <link>http://community.activestate.com/forum-topic/changing-html-script-colo</link>
 <description>Comments for &quot;Changing HTML script colors&quot;</description>
 <language>en</language>
<item>
 <title>Settings which have no effect or are meaningless</title>
 <link>http://community.activestate.com/forum-topic/changing-html-script-colo#comment-4302</link>
 <description>&lt;blockquote&gt;&lt;p&gt;
&lt;strong&gt;ericp&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The challenge is in coming up with a design that works in the Komodo&lt;br /&gt;
architecture, and is easy to manipulate in the UI.
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;It would be good at first to have UI cleaned from all settings which have no effect or are meaningless. For example, it seems that from all Lang-Specific settings for HTML only settings for tags and attribute names have effect. So why to have another 18 (!) options ? &lt;/p&gt;
&lt;p&gt;Its really confusing to try to set color preferences when only 2 settings out of 20 are functioning.&lt;/p&gt;
</description>
 <pubDate>Sat, 23 Feb 2008 03:04:32 -0800</pubDate>
 <dc:creator>Laisvunas</dc:creator>
 <guid isPermaLink="false">comment 4302 at http://community.activestate.com</guid>
</item>
<item>
 <title>Thinking out loud on the subject...</title>
 <link>http://community.activestate.com/forum-topic/changing-html-script-colo#comment-4275</link>
 <description>&lt;p&gt;I&#039;m going to address points 1 through 7, referencing existing or new&lt;br /&gt;
bugs as I go.  These are great points.&lt;/p&gt;
&lt;p&gt;1. &quot;Language-specific&quot; settings sometimes have no effect, or are meaningless.&lt;/p&gt;
&lt;p&gt;The issue is that the editor colors each character in the buffer with an&lt;br /&gt;
abstract style number.  We then map (document language, style number) to&lt;br /&gt;
a style name (&quot;variable&quot;, &quot;attribute name&quot;, &quot;string&quot;), and then use the&lt;br /&gt;
preferences to assign each case of (document language, style name) to a set&lt;br /&gt;
of visible styles (foreground color, background color, italic, etc.).  We&lt;br /&gt;
need to bring sublanguages into the picture.  For example, HTML documents&lt;br /&gt;
can contain sublanguages like &quot;Markup&quot;, JavaScript, and CSS.&lt;/p&gt;
&lt;p&gt;2. Assigning different tags different colors isn&#039;t possible.&lt;/p&gt;
&lt;p&gt;This also requires some design.  All the multi-part language colorizers&lt;br /&gt;
are currently described in UDL.  Due to old limitations in the Scintilla&lt;br /&gt;
editor, we could only use 56 different styles to represent all combinations&lt;br /&gt;
of (sublanguage x style).  With advances in Scintilla, we will be able to&lt;br /&gt;
use 248 styles, which means there is now enough room to color some element&lt;br /&gt;
names differently, distinguish &quot;!important&quot; from other CSS style values, etc.&lt;br /&gt;
The challenge is in coming up with a design that works in the Komodo&lt;br /&gt;
architecture, and is easy to manipulate in the UI.&lt;/p&gt;
&lt;p&gt;3. The bug here is that HTML attribute values are mapped to the style name&lt;br /&gt;
of &quot;string&quot;.  There&#039;s an easy fix, which will break autocompletion in&lt;br /&gt;
languages like RHTML, and a hard fix, which is discussed at&lt;br /&gt;
&lt;a href=&quot;http://bugs.activestate.com/show_bug.cgi?id=75047&quot; title=&quot;http://bugs.activestate.com/show_bug.cgi?id=75047&quot;&gt;http://bugs.activestate.com/show_bug.cgi?id=75047&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;4. &quot;Sometimes colors change.&quot;&lt;/p&gt;
&lt;p&gt;Could you give a reproducible example?  Or is it random?&lt;/p&gt;
&lt;p&gt;5. The sample code changes colors, the source code doesn&#039;t:&lt;/p&gt;
&lt;p&gt;Again, a repro would help.&lt;/p&gt;
&lt;p&gt;6. &quot;Nonsense syntax type&quot;.  The &quot;keywords2&quot; type is supported by&lt;br /&gt;
Scintilla for Python, the C/C++/C#/Java family, and Lua, but we&lt;br /&gt;
don&#039;t use it here.  It should die.  &lt;a href=&quot;http://bugs.activestate.com/show_bug.cgi?id=75048&quot; title=&quot;http://bugs.activestate.com/show_bug.cgi?id=75048&quot;&gt;http://bugs.activestate.com/show_bug.cgi?id=75048&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;7. &quot;File association syntax colouring doesn&#039;t always stick. &quot;&lt;/p&gt;
&lt;p&gt;Did you press &quot;Add&quot; after you specified the new Pattern and Language,&lt;br /&gt;
and before pressing &quot;OK&quot;?  If not, the mapping isn&#039;t saved.&lt;/p&gt;
&lt;p&gt;Bug &lt;a href=&quot;http://bugs.activestate.com/show_bug.cgi?id=75053&quot; title=&quot;http://bugs.activestate.com/show_bug.cgi?id=75053&quot;&gt;http://bugs.activestate.com/show_bug.cgi?id=75053&lt;/a&gt;&lt;/p&gt;
</description>
 <pubDate>Thu, 21 Feb 2008 14:32:04 -0800</pubDate>
 <dc:creator>ericp</dc:creator>
 <guid isPermaLink="false">comment 4275 at http://community.activestate.com</guid>
</item>
<item>
 <title>Inconsistent </title>
 <link>http://community.activestate.com/forum-topic/changing-html-script-colo#comment-4273</link>
 <description>&lt;p&gt;Inconsistent.&lt;/p&gt;
&lt;p&gt;4. Sometimes colours change.  Other times they do not.&lt;br /&gt;
5. Sometimes the example text shows a selected colour change - but the source code never changes.&lt;br /&gt;
6. Nonsense syntax type - Keywords2?!?! - which are the &#039;2&#039; kind of keywords?&lt;br /&gt;
7. File association syntax colouring doesn&#039;t always stick.  Since this is a Drupal site you must appreciate that I would like *.module files to be treated as PHP.  Even after changing the file association *.module files seem to have a mind of their own when it comes to colouring.&lt;/p&gt;
&lt;p&gt;andre&lt;/p&gt;
</description>
 <pubDate>Thu, 21 Feb 2008 13:22:46 -0800</pubDate>
 <dc:creator>andremolnar</dc:creator>
 <guid isPermaLink="false">comment 4273 at http://community.activestate.com</guid>
</item>
<item>
 <title>Three problems with syntax coloring in Komodo</title>
 <link>http://community.activestate.com/forum-topic/changing-html-script-colo#comment-4251</link>
 <description>&lt;p&gt;Basic  interface for setting syntax colors in Komodo is quite elegant, but because of some  details (and maybe bugs) resultant usability is poor.&lt;/p&gt;
&lt;p&gt;I see three problems with current state of syntax coloring.&lt;/p&gt;
&lt;p&gt;1. It is difficult to make sense of many options. For example, what might Lang-specific option to set coloring for variables in HTML mean? Setting such option does not change anything in example you find above the form.&lt;/p&gt;
&lt;p&gt;2. Many options you might expect to find are not present. For example, there is no possibility to set coloring for CSS selectors, for CSS !important, for different coloring of HTML anchor, form and table tags.&lt;/p&gt;
&lt;p&gt;3. Setting Lang-specific coloring does not override coloring which was set as  Common syntax coloring even in single language documents. For example, if I set as Common syntax preference that strings should be colored green, then HTML attribute values, since they are between double quotes, are also colored green, and setting as Lang-specific option that HTML attribute values should be colored blue, has no effect at all. May be this behavior is a bug?&lt;/p&gt;
&lt;p&gt;Effect of these problems  is this: syntax coloring in Komodo neither works out of the box nor it is possible using graphical interface to set it according your preferences. It is big contrast with such editors as PSPad or Dreamweaver in which you have both.&lt;/p&gt;
</description>
 <pubDate>Wed, 20 Feb 2008 13:03:17 -0800</pubDate>
 <dc:creator>Laisvunas</dc:creator>
 <guid isPermaLink="false">comment 4251 at http://community.activestate.com</guid>
</item>
<item>
 <title>another editor example</title>
 <link>http://community.activestate.com/forum-topic/changing-html-script-colo#comment-4240</link>
 <description>&lt;p&gt;Though it is not a true IDE, TextMate on the Mac does a background coloring to show when an html page has javascript or php (for example).&lt;/p&gt;
</description>
 <pubDate>Tue, 19 Feb 2008 13:46:40 -0800</pubDate>
 <dc:creator>mtcsw</dc:creator>
 <guid isPermaLink="false">comment 4240 at http://community.activestate.com</guid>
</item>
<item>
 <title>We considered this long ago, backed out due to complex UI</title>
 <link>http://community.activestate.com/forum-topic/changing-html-script-colo#comment-4239</link>
 <description>&lt;p&gt;Clearly it&#039;s time to have a look at how many other tools&lt;br /&gt;
are supporting this, and implement multi-language&lt;br /&gt;
coloring for Komodo.&lt;/p&gt;
&lt;p&gt;You can follow the bug at&lt;br /&gt;
&lt;a href=&quot;http://bugs.activestate.com/show_bug.cgi?id=70949&quot; title=&quot;http://bugs.activestate.com/show_bug.cgi?id=70949&quot;&gt;http://bugs.activestate.com/show_bug.cgi?id=70949&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The bug references this discussion as well.&lt;/p&gt;
</description>
 <pubDate>Tue, 19 Feb 2008 13:37:42 -0800</pubDate>
 <dc:creator>ericp</dc:creator>
 <guid isPermaLink="false">comment 4239 at http://community.activestate.com</guid>
</item>
<item>
 <title>More flexibility in editing HTML syntax color scheme</title>
 <link>http://community.activestate.com/forum-topic/changing-html-script-colo#comment-4233</link>
 <description>&lt;p&gt;It would be handy if there were more flexibility in editing HTML syntax color scheme. In Komodo it is possible only to set fore and background colors for HTML tags; it is not possible to color different tags in different colors or to color symbols &amp;lt;, /, &amp;gt; in one color and tag names such as &quot;a&quot;, &quot;div&quot;, &quot;table&quot; in another color.&lt;/p&gt;
&lt;p&gt;In Komodo there is no way to reproduce Dreamweaver&#039;s HTML syntax coloring (I think it is excellent). In Dreamweaver it is possible to set different fore and background colors for:&lt;/p&gt;
&lt;p&gt;anchor tags&lt;/p&gt;
&lt;p&gt;table tags&lt;/p&gt;
&lt;p&gt;form tags&lt;/p&gt;
&lt;p&gt;image tags&lt;/p&gt;
&lt;p&gt;style tags&lt;/p&gt;
&lt;p&gt;script tags&lt;/p&gt;
&lt;p&gt;object tags&lt;/p&gt;
&lt;p&gt;HTML special characters&lt;/p&gt;
&lt;p&gt;HTML comments&lt;/p&gt;
&lt;p&gt;HTML attributes&lt;/p&gt;
&lt;p&gt;HTML attribute values&lt;/p&gt;
&lt;p&gt;HTML text&lt;/p&gt;
&lt;p&gt;CSS selectors (there is no way to do this in Komodo!)&lt;/p&gt;
&lt;p&gt;CSS values&lt;/p&gt;
&lt;p&gt;CSS strings&lt;/p&gt;
&lt;p&gt;CSS !important&lt;/p&gt;
&lt;p&gt;CSS properties&lt;/p&gt;
&lt;p&gt;CSS comments&lt;/p&gt;
&lt;p&gt;CSS import&lt;/p&gt;
&lt;p&gt;CSS media&lt;/p&gt;
&lt;p&gt;JS brackets&lt;/p&gt;
&lt;p&gt;JS comments&lt;/p&gt;
&lt;p&gt;JS function keyword&lt;/p&gt;
&lt;p&gt;JS keywords&lt;/p&gt;
&lt;p&gt;JS reserved words&lt;/p&gt;
&lt;p&gt;JS strings&lt;/p&gt;
&lt;p&gt;JS regex&lt;/p&gt;
&lt;p&gt;I think that a good interface for editing color schemes should give  flexibility  analogous to Dreamweaver&#039;s.&lt;/p&gt;
</description>
 <pubDate>Tue, 19 Feb 2008 03:31:54 -0800</pubDate>
 <dc:creator>Laisvunas</dc:creator>
 <guid isPermaLink="false">comment 4233 at http://community.activestate.com</guid>
</item>
<item>
 <title>Check out  PSPad Editor&#039;s HTML multihighlighter</title>
 <link>http://community.activestate.com/forum-topic/changing-html-script-colo#comment-4215</link>
 <description>&lt;p&gt;&lt;a href=&quot;http://www.pspad.com/&quot;&gt;PSPad&lt;/a&gt; Editor does a good job at syntax coloring of multi-language documents. In this editor you can choose to highlight a document simply as HTML or using HTML multihighlighter. If the last option was chosen then CSS, javascript and HTML sections of the document are colored according preferences set for those languages.&lt;/p&gt;
&lt;p&gt;It would be nice to have in Komodo something analogous to PSPad&#039;s HTML multihighlighter.&lt;/p&gt;
</description>
 <pubDate>Mon, 18 Feb 2008 06:23:51 -0800</pubDate>
 <dc:creator>Laisvunas</dc:creator>
 <guid isPermaLink="false">comment 4215 at http://community.activestate.com</guid>
</item>
<item>
 <title>Any progress on this?</title>
 <link>http://community.activestate.com/forum-topic/changing-html-script-colo#comment-4190</link>
 <description>&lt;p&gt;I too am new to Komodo and am enjoying having a decent IDE to work in again.  I would like to second this suggestion for background color options for languages within a file.  I frequently have javascript, php, and html on the same page and having the ability to color the background of a language would make it much easier to scan a page and quickly find what you&#039;re looking for.&lt;/p&gt;
&lt;p&gt;I went to look at the bug report, but do not see any action taken or response given from Komodo.&lt;/p&gt;
</description>
 <pubDate>Wed, 13 Feb 2008 17:20:59 -0800</pubDate>
 <dc:creator>mtcsw</dc:creator>
 <guid isPermaLink="false">comment 4190 at http://community.activestate.com</guid>
</item>
<item>
 <title>Time to revisit this</title>
 <link>http://community.activestate.com/forum-topic/changing-html-script-colo#comment-2257</link>
 <description>&lt;p&gt;Definitely, Scite does a good job of coloring multi-language documents.&lt;/p&gt;
&lt;p&gt;The problem is that it&#039;s configured by editing a large document full of&lt;br /&gt;
numbers indicating the internal style values and colors.  We expect&lt;br /&gt;
that most people expect better than that kind of method of configuring&lt;br /&gt;
an IDE.  We explored this area several years ago (Komodo 2 if memory&lt;br /&gt;
serves), and gave up because it was too complicated.  Now that we&#039;re&lt;br /&gt;
building more support for multi-language documents it&#039;s time to&lt;br /&gt;
revisit it.&lt;/p&gt;
&lt;p&gt;I&#039;ve logged a bug at&lt;br /&gt;
&lt;a href=&quot;http://bugs.activestate.com/show_bug.cgi?id=70949&quot; title=&quot;http://bugs.activestate.com/show_bug.cgi?id=70949&quot;&gt;http://bugs.activestate.com/show_bug.cgi?id=70949&lt;/a&gt;&lt;/p&gt;
</description>
 <pubDate>Wed, 11 Jul 2007 10:28:02 -0700</pubDate>
 <dc:creator>ericp</dc:creator>
 <guid isPermaLink="false">comment 2257 at http://community.activestate.com</guid>
</item>
<item>
 <title>Check out how SciTE does it</title>
 <link>http://community.activestate.com/forum-topic/changing-html-script-colo#comment-2252</link>
 <description>&lt;p&gt;JeffG,&lt;/p&gt;
&lt;p&gt;I&#039;ve checked the PHP, the JavaScript and the HTML syntax highlight and coloring, and I&#039;ve found that the coloring syntax scheme is always set by the file&#039;s extension; for instance in a .html extension, Komodo is always treating everything as HTML, it&#039;s not changing the language for neither the   block nor the &amp;lt;?php  ?&amp;gt; block; it always uses HTML for coloring everything.&lt;/p&gt;
&lt;p&gt;As an example, I went to the PHP coloring and changed the default&#039;s background color to red, then I went to the JavaScript syntax coloring and changed the default&#039;s background to blue, I left the HTML&#039;s default background color white. Next I pasted the above code in a new .html file and in a new .php file, as a result, in the .html file, the whole thing had a white background, whilst in the .php file everything had a red background color. The thing is both the .html and the .php should be shown exactly in the same way: the HTML portion of the code should have a white background, the JavaScript portion should have a blue background and the PHP block should have a red background... Now, if I open a .js file and add stuff to it, that sure should have everything in a blue background as there are no &quot;blocks&quot; in JavaScript. The described problem also applies to the CSS blocks and maybe to other things in also other languages...&lt;/p&gt;
&lt;p&gt;Also, it a related issue, I think it should be possible to set different font faces to the different elements of a language syntax, like for instance, I&#039;d like to set a proportional font to all that is not a tag in HTML (not to the stuff inside blocks like CSS, PHP or JavaScript, those blocks should be handled by its own language syntax style), and a fixed type to the tags and other stuff.&lt;/p&gt;
&lt;p&gt;I understand you&#039;re using Scintilla for syntax highlight so I guess all this I&#039;m asking is not impossible nor too difficult to do with the Scintilla engine working underneath. Please, check the SciTE website (&lt;a href=&quot;http://www.scintilla.org/SciTE.html&quot; title=&quot;http://www.scintilla.org/SciTE.html&quot;&gt;http://www.scintilla.org/SciTE.html&lt;/a&gt;) and get SciTE (currently on version 1.74) (windows version is a single executable file, only around 500K). Then try pasting and saving as either .php of .html (doesn&#039;t matter) the following snippet for a nice looking example of what I mean Komodo should work:&lt;/p&gt;
&lt;pre class=&quot;geshifilter&quot;&gt;&amp;lt;html&amp;gt;
    &amp;lt;head&amp;gt;
        &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;
            // some JavaScript code, but still with the default colors for JavaScript
            var func = function() {
            alert(&quot;Help!&quot;);
            };
        &amp;lt;/script&amp;gt;
        &amp;lt;style  type=&quot;text/css&quot;&amp;gt;
            /* even SciTE gets this is wrong, CSS block should be shown 
                correctly here (with CSS coloring), but they show as just regular text: */
            body {
                background: black;
                color: #80c0c0;
            }
        &amp;lt;/style&amp;gt;
    &amp;lt;/head&amp;gt;
    &amp;lt;body&amp;gt;
        &amp;lt;?php
            // some PHP code, but using the PHP syntax colors
            $str =&amp;lt;&amp;lt;&amp;lt;EOC
                Check the heredoc working here
EOC;
            echo $str;
        ?&amp;gt;
        This text is shown with proportional font face as 
        it&#039;s not a tag nor part of a block in other language.
    &amp;lt;/body&amp;gt;
&amp;lt;html&amp;gt;&lt;/pre&gt;&lt;p&gt;
That&#039;s what&#039;s possible to do and I really think it looks amazing (check how the heredoc in PHP also works as it should, unfortunately for SciTE the CSS block is not having the right colors in it either, they must have missed that one.)&lt;/p&gt;
&lt;p&gt;I hope you can figure this out, SciTE almost has it working properly and it&#039;d be a big step forward if you could fix it to work at least that way too...&lt;/p&gt;
&lt;p&gt;By the way, I almost forgot to mention I&#039;ve also tried all this in Komodo 4.2 beta. &lt;/p&gt;
&lt;p&gt;Congrats to your programmers and your development team (and the marketing team, it&#039;s a very smart move to have the editor free), Komodo is an excellent program, it easily beats all the competition big time already (and I sure have tried them all.) Keep up the good work :)&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;
Kronuz.&lt;/p&gt;
</description>
 <pubDate>Tue, 10 Jul 2007 20:05:12 -0700</pubDate>
 <dc:creator>Kronuz</dc:creator>
 <guid isPermaLink="false">comment 2252 at http://community.activestate.com</guid>
</item>
<item>
 <title>That&#039;s a PHP file</title>
 <link>http://community.activestate.com/forum-topic/changing-html-script-colo#comment-2248</link>
 <description>&lt;p&gt;Code like the above sample is actually treated like a PHP file, or should be.&lt;/p&gt;
&lt;p&gt;--&lt;br /&gt;
JeffG&lt;/p&gt;
</description>
 <pubDate>Tue, 10 Jul 2007 16:56:45 -0700</pubDate>
 <dc:creator>jeffg</dc:creator>
 <guid isPermaLink="false">comment 2248 at http://community.activestate.com</guid>
</item>
<item>
 <title>Yes, I tried that, but still</title>
 <link>http://community.activestate.com/forum-topic/changing-html-script-colo#comment-2243</link>
 <description>&lt;p&gt;Yes, I tried that, but still that doesn&#039;t change the colors of the languages embedded in other languages... such as for HTML (after changing both PHP and Javascript colors as you said, in a per-language basis):&lt;/p&gt;
&lt;pre class=&quot;geshifilter&quot;&gt;&amp;lt;html&amp;gt;
    &amp;lt;head&amp;gt;
        &amp;lt;script&amp;gt;
            // some JavaScript code, but still with the default colors for JavaScript
            // (not my new defines for the JavaScript language)
        &amp;lt;/script&amp;gt;
    &amp;lt;/head&amp;gt;
    &amp;lt;body&amp;gt;
        &amp;lt;?php
            // some PHP code, but still with the default colors
        ?&amp;gt;
    &amp;lt;/body&amp;gt;
&amp;lt;html&amp;gt;&lt;/pre&gt;</description>
 <pubDate>Tue, 10 Jul 2007 11:23:00 -0700</pubDate>
 <dc:creator>Kronuz</dc:creator>
 <guid isPermaLink="false">comment 2243 at http://community.activestate.com</guid>
</item>
<item>
 <title>Sure</title>
 <link>http://community.activestate.com/forum-topic/changing-html-script-colo#comment-2237</link>
 <description>&lt;p&gt;You can create our own color schemes in Komodo at&lt;/p&gt;
&lt;p&gt;Preferences / Fonts and Colors&lt;/p&gt;
&lt;p&gt;Colors can be set both globally and per-language.&lt;/p&gt;
&lt;p&gt;--&lt;br /&gt;
JeffG&lt;/p&gt;
</description>
 <pubDate>Tue, 10 Jul 2007 10:21:20 -0700</pubDate>
 <dc:creator>jeffg</dc:creator>
 <guid isPermaLink="false">comment 2237 at http://community.activestate.com</guid>
</item>
<item>
 <title>Changing HTML script colors</title>
 <link>http://community.activestate.com/forum-topic/changing-html-script-colo</link>
 <description>&lt;p&gt;Is it possible to change the JavaScript, the PHP, and other scripting languages inside the HTML? Like for instance, what I want is to use a different background color for the JavaScript and PHP in my HTML code.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;
Kronuz.&lt;/p&gt;
</description>
 <comments>http://community.activestate.com/forum-topic/changing-html-script-colo#comments</comments>
 <category domain="http://community.activestate.com/forums/komodo-support-0">Komodo support</category>
 <category domain="http://community.activestate.com/os/windows-vista">Windows Vista</category>
 <pubDate>Tue, 10 Jul 2007 00:59:05 -0700</pubDate>
 <dc:creator>Kronuz</dc:creator>
 <guid isPermaLink="false">1119 at http://community.activestate.com</guid>
</item>
</channel>
</rss>
