One of my projects uses XML to do UI markup and it includes JavaScript sections. The generic XML syntax highlighter however doesn’t recognize these blocks and then highlights “invalid” sections. The HTML one does not, but then of course it highlights all our custom tags.
How can I disable this highlighting? Or even better, is there a way to create a mixed mode highlighting so the JavaScript parts can be JS highlighted?
Is there a way to perhaps just disable interactive syntax checking in general. I’m just not liking how it works elsewhere as well. For example, in C# while typing a string half of the line highlights when I type the first quote.
In response to your first query: your XML is technically not valid, strict XML from the perspective of a strict XML syntax checker (which is what we have). I’m sure the tool you use to process such XML is more lax, but to Komodo your XML is not valid XML. You can disable the syntax checking via Edit > Preferences > Syntax & Spell Checking.
As for your second query: you’d have to create a custom syntax highlighter that mixes XML and JavaScript. You can find some material on creating one here: http://docs.komodoide.com/SDK/udl
As for your C# issue, you can remove the highlighting by changing the “Edit > Preferences > Color Scheme > Editor > stringeol” background color to match your default background color.
Note you could mark your language as XBL (Xul Binding), which is XML with JavaScript syntax support. I’m not certain that would work but it’s worth a try.
Additionally you could wrap your JS code in <!-- CODE --> tags, although unless you are using XBL that would disable syntax highlighting on your JS code.
The only other option would be to write your own language addon, which you could base off of XBL:
I know my document isn’t technically XML, it’s a derived format (like HTML it allows unescaped code blocks).
I’ve just disabled the syntax checking for now. Even if I could fix the JavaScript bit the marking of unclosed tags becomes annoying. As I type an new open tag <SomeTag> it starts hightlghting errors until I close it, and then it still takes a while before it removes the markings. So I’ll just keep the syntax checking off entirely.
I am afraid that this problem is more a general bug everywhere in Komodo edit.
I have this problem, in HTML5, in CSS· but it turns umbereable in Javascript.
If I make a mistake in a line (or even not ended to write the line) I can’t see the line to correct it.
Oh, welll, as I tried the 2 options of EOL markers, and there is no “stringeol” setting under any category, I can conclude that I discovered a real bug in this editor, so great I am …
You should be made aware that even if you had found a bug in Komodo 8 we wouldn’t be making any fixes for it.
You might be interested to know that we have provided several options in Komodo 10 that should make it easier to use for someone with sensitive eyes. If you choose to try it and need assistance please feel free to open a forum post to ask questions.
Oh man, thaaaaaaank you very much, yes, stringeol setting has done the right efect on screen, it makes the old Komodo9 again the friend it used to be.
No , I will not ask for a fix if there are updated versions of the editor.
The thing is that some new “user friendly” designs are being made widespread in the user interface software of many programs, and is not the first time I find better the older version. In fact I use an outdated version of Adobe reader, tried a pair of releases of version X, and then returned to 9.
I also tested Atom, with beautiful color options for text (I like shinning colors over pitch black background), but Komodo is better to code with.
As my last installation of Komodo 10 was about one year ago, maybe I find it better, now.
Thank you very much again for your professional help, and excuse me for any time waste I could have caused.