Ace editor / embed multiple syntax highlight - syntax

I'm using ace editor with "html" mode for web programming as a web IDE. I can highlight code for HTMl, CSS and JavaScript. It works nicely. This is my code:
editor.getSession().setMode('ace/mode/html');
I'd like to embed coffeescript and typescript syntax highlight too when using the
<script type='text/coffeescript'>
and
<script type='text/typescript'>
tags on the page. Ace does have modes for these languages but they are separate files (mode-coffee.js and mode-typescript.js) and I don't know how I could embed these into mode-html.js. The code is rather complicated.
Could you kindly help me out? I've been studying these files for several hours now and I'd appreciate any help. Thank you.

This is currently not possible. We are looking into adding this as a feature, which is being tracked by a GitHub issue here.

Related

HTML highlighting in ATOM dysfunctional when using ZURB Foundation Template Engine Syntax

Im new to ZURB Foundation 6 and its Foundation CLI. Using the template engine works like a charm though, except for the syntax highlighting so far.
Here is a screenshot:
https://imgur.com/P1MCv3X
As you can see, highlighting the beginning and end of an HTML Element doesnt work anymore when Im using the template engine syntax with the double brackets. The site works perfectly, so this erroneous interpretation of the HTML structure is a problem of the editor.
Is there any way to work around this issue in ATOM? Or do I have to live with it?
When you're using a templating engine such as Handlebars (which ZURB seems to use), you need to install a language syntax for that. There are several available, you need to find out for yourself which one works best for you.
Once installed, you either need to work with .hbs files for automatic detection, or you have to specify the syntax manually by clicking on the dialog that reads "HTML" on your screenshot (in the bottom right).

Komodo Edit 8 doesn't recognize Django tags for HTML5 pages

I am using Komodo Edit 8 for a Django project. HTML5 pages do not recognize django template tags for syntax highlighting or code intelligence. However, HTML pages do accurately recognize these tags. Is there a setting that can be adjusted? Can I just make all HTML5 pages be recognized as only an HTML page?
It appears to me that .html files that are snippets are recognized as HTML (4) and .html files that contain the <html> tag are recognized as HTML5.
I found this StackOverflow page, but the answer does not correct my problem
My Komodo build is:
Komodo Edit, version 8.0.2, build 12590, platform linux-x86_64
Well, that was a total noob question. The answer is simple. To solve, switch the file type from "HTML5" to "Django" using the selector on the status bar at the bottom of the application.

How can I get IntelliSense to work inside of a script tag for Razor helpers?

IntelliSense does not work in Visual Studio 2010 if you are inside of a <script> tag and try to use #Html.. Anyone know how to enable or fix that?
Please note: This is not for javascript, jQuery, or similar, IntelliSense-enabling which is possible.
This appears to be a bug/complexity resulting from hosting JavaScript inside the HTML editor: http://aspnet.uservoice.com/forums/41199-general-asp-net/suggestions/2706979-improve-the-razor-intellisense-inside-script-block
It doesn't look like it will be resolved anytime soon.
Just a quick suggestion, separate JavaScript and Razor like I described here:
https://stackoverflow.com/a/11109799/538387

Netbeans code folding for HTML files?

I've looked for anything about how to fold the code down in HTML files using Netbeans. Does anyone know? I'm on a Mac using Netbeans 7.1.1 and I've already hit up the Preferences>General area... am I missing something here? Any help for this newbie would be greatly appreciated.
Code folding is already enabled on elements in an HTML file. You can collapse the individual tags, or groups of tags.

C++ syntax highlighting html generator

I'm writing blog posts for my company blog and I would like code snippets to show up with syntax highlighting.
All I can do is write html/css.
Is there any app/webapp that will let me paste in a c++ code snippet and get a chunk of html with the highlighting?
Try this Online syntax highlighting Site, and especially the C++ section.
You paste in your code and it does the hard work.
I use emacs M-Xhtmlize-bufferRET. Also enscript is very powerful to generate colorized HTML from many source code formats.
For others looking for a solution to this problem - you should checkout:
http://oneqonea.blogspot.com/2012/04/how-do-i-add-syntax-highlighting-to-my.html
It's a really easy "SyntaxHighlighter for Blogger" tutorial with screenshots and everything.
You should be up and running in only a few minutes.
Also, for your C++ application, make sure you have the shBrushCpp.js library referenced in your <head></head> section like this:
<head>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCpp.js' type='text/javascript'/>
</head>
Have a look at http://www.syntaxhighlight.com - supporting 222 languages. Paste your code and get the formatted html.

Resources