Menu

[Request] Syntax Highlighting & User Defined

2007-09-14
2012-11-13
  • Nobody/Anonymous

    Hi,

    First let me say Notepad++ is very promising!

    I don't know how to phrase the request correctly so let me describe a real world scenario.

    I open up an active server page (asp) in Notepad++. I launch the Styler Configurator. I select the 'asp' from the 'Language' column and 'WORD' for the 'Style' column. I'm able to add to the default keywords via the 'User Define Keywords' field. (this is a *great* feature btw). This however is the only 'Style' that I'm able to add keywords too.

    Ideally I would like to have keywords a certain color, functions & their properties another color and lastly application specific names in another color.

    Thinking that it was just a UI limitation I tried to add a new entry under ASP to the langs.xml file (instre2) but it didn't work the way I expected. I also tried to manually edit the stylers.xml to get the added keywords and function but failed there too.

    After checking through the site I saw the screenshots of the User Defined Dialog. Here there are entries for 4 lists of keywords (that's great!!) However I'm not able to replicate the style that is currently set the default for ASP. There's no way to tell it to only apply these styles within (<%, %>) or (<script></script>). There's also no way of telling it to style javascript, css, or (x)html like the default ASP language style does.

    So very good on the additional keywords!! But I can't quite replicate the built in ASP style yet. My request is to either:

    1. Add additional keyword lists to the built-in languages (ASP in this case)

    or

    2. (Under User Define Dialog) Add support for script delimiters (within which the user defined style is applied) AND Add a selection list to allow selection of built-in language styles (in ASP case javascript, css, and (x)html)

    Does that make sense?

    If anyone can help with a temporary workaround that would be fantastic!!

    Jim

     
    • Nobody/Anonymous

      ASP is a built-in language, which have a corresponding lexer (parser written on C). Amount of word groups and rules of parsing are defined inside this lexer. You can use User-defined language, but it allows to create a very simple rules, or you can download the source, open scintilla module, edit LexHTML.cxx and add there whatever you like. Than recompile the SciLexer.dll and put it to np++ directory. Yep, not user-friendly, but fast in runtime and very powerfull way :)