! "Lowlighting" patterns for HTML ! ! I made this little utility-mode to give an alternate view of HTML ! files, and thought maybe others might find it useful too. ! ! It is in _no_ way intended to replace the normal SGML/HTML pattern, ! but can be useful to enter manually now and again, to get an overview ! of what actual content is there, and where it is hiding in the sea of ! markup. Esp. useful when inspecting other people's code. ! ! It does more or less the exact opposite of the normal one: it dims ! down all the markup, and emphasises what is actually shown on the web ! page: text and images. It also colors the links blue. ! ! The syntax might not be 100% robust wrt. the HTML spec; the whole ! thinkg is a pretty quick'n'dirty job. Feel free to fix it if you ! like. ! ! Load this pattern by starting nedit with: ! ! nedit -import ! ! Then, check that the patterns were loaded correctly, and choose Save Defaults ! from the Preferences menu. The new patterns will now be incorporated into ! your own .nedit file, so the next time you start NEdit, you will no longer ! need to use -import. ! nedit.highlightPatterns: inverse HTML:1:0{\n\ link:"(?i\\<\\s*a(\\s[^>]*)?\\>)":"(?i\\<\\s*/a\\s*\\>)"::Dim::\n\ link image:"(?i\\<\\s*img[^>]*src=(""[^""]*"")[^>]*\\>)":::Dim:link:\n\ link imagename:"\\1":""::Image link:link image:C\n\ link tag:"\\<":"\\>"::Dim:link:\n\ link text:".":::Link:link:\n\ image:"(?i\\<\\s*img[^>]*src=(""[^""]*"")[^>]*\\>)":::Dim::\n\ imagename:"\\1":""::Image:image:C\n\ escape:"&[^;]*;":::Text Escape::\n\ tag:"\\<":"\\>"::Dim::D\n\ } nedit.languageModes: inverse HTML::::::: nedit.styles: \ Dim:gray70:Plain\n\ Link:blue3:Plain\n\ Image:black:Italic\n\ Image link:blue3:Italic