Menu

creating a new style for PHP

2007-06-28
2012-11-13
  • Nobody/Anonymous

    I decided I wanted functions such as (trim, str_replace, etc) to be highlighted teal in my editor. I added this line to stylers.xml

    <WordsStyle name="FUNCTIONS" styleID="128" fgColor="0080C0" bgColor="FEFCF5" fontName="" fontStyle="1" fontSize="" keywordClass="instre2" />

    then this line to langs.xml

    <Keywords name="instre2">str_replace trim fwrite</Keywords>

    Now, this does not actually color str_replace, trim, or fwrite, but this information is available in the Styler Configurator.

    How do I get these tags to work? I chose a styleID that was not already in stylers.xml

    Thanks in advance

     
    • cchris

      cchris - 2009-05-07

      Using Notepad++ to channge irs own config files may fail because these config files are iverwritten on exit, and read once on startup only.

      A simple way around this is to
      * save the edited config files
      * mark them as read only
      * close Notepad++
      * Reopen Notepad++ (I assume the last session is being remembered)
      * Clear the read only flags set at step 2

      CChris

       
    • Nobody/Anonymous

      Should I list this as a bug since there doesn't seem to be a fix?

       
      • skimmas

        skimmas - 2009-05-06

        You're probably changing the worng stylers.xml
        theres one at the notepad++ folder and one at C:\Documents and Settings\skimmas\Application Data\Notepad++\stylers.xml .

        It also took me a long time to figure that one out.

         
    • Nobody/Anonymous

      I have been trying to get the stylers.xml to work for me.

      I have made several changes to the color scheme of my Notepad++ (light text on black background). After making all those changes manually, I opened the stylers.xml file and found that it doesn't correspond to my changes at all.

      I guess this feature is buggy or hasn't been fully implemented yet.  Do any of the developers have more information?

      Thanks!
      James

       
    • MJG

      MJG - 2007-07-08

      A couple of things come to mind:

      1) One probably should not use Notepad++ to change Notepad++ configuration files, since Notepad++ will update most of its configuration when it is closed, overwriting any changes.

      2) Additions of custom keyword classes for a language may not be supported; some of the language support might be hard-coded in the executable, I think.

      3) PHP may need some rework, based on what I've seen posted.  You might post a bug report with the specific behavior problems, after checking whether it has already been posted -- in which case you might add a comment.

      4) "developers" -> There's just one.  I saw elsewhere that Don's work laptop was being repaired, so some patience might be in order...  --Joel