A Colourful HTML (html.zip v1.1 by Venimus)
Submitted by Tuesday, 31 August, 2004 - 11:55
on
Update:
features (what highlights):
known bugs (hard to fix):
follow the usual steps for installing a mode definition:
markup - unknown tag
keyword1 - tag
keyword2 - attribute name, <tr>, </tr>
keyword4 - tag that MUST be included in other tag
keyword3 - deprecated tag
function - unknown attribute
literal1 - attribute value
literal2 - inline css
literal3 - inline javascript
comment1 - comment
comment2 - m$ conditional definition (IE)
- The mode is now compatible with 4.3pre5+.
- DOCTYPE highlighted
- highlighted
- Highlighting of multiline tags improved (but not perfect).
- Highlighting of numbers improved.
- Some other bugs fixed.
features (what highlights):
- extended tag/attributes recognition
- some error recognition
- inline CSS (requires mode - CSS v2.2 by John Paul Taylor II [updated])
- inline Javascript
- PHP
- no asp and vbs support
known bugs (hard to fix):
- The first atribute must be preceded by space/tab, new line is not enough, the rest work ok.
- there is small chance, but it is possible an invalid attribute to highlight as "event", it is caused of the impossibility of matching line-starts (or EOLs) in regex (due to limitations)
- There is a bug in jedit if background for color syntax is set. That background incorrectly applies to other tokens which doesn't have a background color set. By default the "invalid" type have a background and the other types doesn't. So the mode may look like it doesnt work. To fix that, set a background to all types or remove the background of the "invalid" type.
follow the usual steps for installing a mode definition:
- overwrite the original html.xml in jedit installation directory, or save it to .jedit/modes directory, and modify .jedit/modes/catalog to include
<MODE NAME="html" FILE="html.xml" FILE_NAME_GLOB="*.{html,htm}" />
- Install the fixed PHP mode (original) included in the package by overwriting or adding definition into the "catalog": <MODE NAME="php" FILE="php.xml" FILE_NAME_GLOB="*.{php}" />
- You may try to use this HTML mode for php files aswell by tricking jEdit to use html.xml to highlight php. This way the html code outside <?php?> will be highlighted. To do it, instead the above definitions (1. & 2.), add the following lines in "catalog" :
<MODE NAME="php" FILE="php.xml" FILE_NAME_GLOB="*.{~}" />
<MODE NAME="html" FILE="html.xml" FILE_NAME_GLOB="*.{html,htm,php}" />
(note the "*.{~}" - it must be an invalid extesnsion, because html.xml will be used for the *.php files aswell, but if we replace directly the original php.xml will not be available for delegation)
I recommed you install the included fixed mode, but the original one should work just fine.
WARNING:This trick may cause some misbehaviour (on theory), because aftar that step "php" files will become "html" for jedit and plugins that depend on it may cease to work. However I didnt notice any problems.
- Install the CSS mode included by overwriting or adding into "catalog":
<MODE NAME="css" FILE="css.xml" FILE_NAME_GLOB="*.{css}" />
- fix your syntax colours from "general options": set a background color to all types or remove the background of the "invalid" type.
markup - unknown tag
keyword1 - tag
keyword2 - attribute name, <tr>, </tr>
keyword4 - tag that MUST be included in other tag
keyword3 - deprecated tag
function - unknown attribute
literal1 - attribute value
literal2 - inline css
literal3 - inline javascript
comment1 - comment
comment2 - m$ conditional definition (IE)
Updated on 07/09/2006 - 16:44
Downloads: 3066