syntax highlighting for django
-
- Posts: 3
- Joined: 14 Oct 2012 11:19
syntax highlighting for django
how to select syntax highlighting an element of the block {% ... %} In the HTML file
Re: syntax highlighting for django
Assuming that your question really reads
1) Environment > Options.. > Source > Enable multiple highlighters in HTML must be "on" (of course)
There's "Set" button, unfortunately, there's no Python listed. Luckily, ASP uses same tags as Python, i.e. <% %> (not {% %}). Alas, you can't just switch ASP highlighter to Python.syx, since this isn't remembered. So you need to navigate to RJ TE "syntax" directory:
a) on Windows 7 it's C:\Users\{username}\AppData\Roaming\RJ TextEd\syntax
b) on Wndows XP it's C:\Documents and Settings\{username}\Application Data\RJ TextEd\syntax
2) in order to rename python.syx to ASP.syx and python.ini to ASP.ini
3) then you need to edit ASP.ini to make its header look like this:
Voilà, you have now Python syntax highlighted
Rickard,
1) I assume that it is a bug that syntax file isn't remembered after restart (see above)
2) adding direct support for Python highlighter in HTML will be much welcomed
the answer is that, to my best knowledge, you can't... easily. But using a little trick you will be able to do this. Here's how:How can you enable Python highlighter in HTML?
1) Environment > Options.. > Source > Enable multiple highlighters in HTML must be "on" (of course)
There's "Set" button, unfortunately, there's no Python listed. Luckily, ASP uses same tags as Python, i.e. <% %> (not {% %}). Alas, you can't just switch ASP highlighter to Python.syx, since this isn't remembered. So you need to navigate to RJ TE "syntax" directory:
a) on Windows 7 it's C:\Users\{username}\AppData\Roaming\RJ TextEd\syntax
b) on Wndows XP it's C:\Documents and Settings\{username}\Application Data\RJ TextEd\syntax
2) in order to rename python.syx to ASP.syx and python.ini to ASP.ini
3) then you need to edit ASP.ini to make its header look like this:
4) and finally restart RJ TE.[MultiHighlight]
Syntax=Html
File=Html.syx
ASPLanguage=
Voilà, you have now Python syntax highlighted

Rickard,
1) I assume that it is a bug that syntax file isn't remembered after restart (see above)
2) adding direct support for Python highlighter in HTML will be much welcomed

Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus
-
- Posts: 3
- Joined: 14 Oct 2012 11:19
Re: syntax highlighting for django
Thank you of course, but this is not what you need. At least be able to select only the tag {%%}
Re: syntax highlighting for django
I don't get it; what do you want to achieve? Highlight just these two strings, {% and %}? Or anything that goes in between? A code sample would be much appreciated (I don't know Python.)
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus