Community
    • Login

    How to add custom Style for Batch Code in Style Configurator?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    xmlstyle colouringbat file
    5 Posts 2 Posters 2.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Lucas ElliottL
      Lucas Elliott
      last edited by

      Hello, I edited the XML file “stylers.xml” so that the batch section looks like this:

          <LexerType name="batch" desc="Batch" ext="">
              <WordsStyle name="DEFAULT" styleID="0" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="12" />
              <WordsStyle name="COMMENT" styleID="1" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
              <WordsStyle name="KEYWORDS" styleID="2" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" keywordClass="instre1" />
              <WordsStyle name="LABEL" styleID="3" fgColor="FF0000" bgColor="FFFF80" fontName="" fontStyle="1" fontSize="" />
              <WordsStyle name="HIDE SYBOL" styleID="4" fgColor="FF00FF" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
              <WordsStyle name="COMMAND" styleID="5" fgColor="0080FF" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
              <WordsStyle name="VARIABLE" styleID="6" fgColor="FF8000" bgColor="FCFFF0" fontName="" fontStyle="1" fontSize="" />
              <WordsStyle name="OPERATOR" styleID="7" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" />
      		<WordsStyle name="TEXTS" styleID="8" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" />
          </LexerType>
      

      The “TEXTS” section is new, and I wanted custom colors for echo. However when I opened the configurator, no new style was there for batch. Any ideas on what I’m missing?

      1 Reply Last reply Reply Quote 0
      • dailD
        dail
        last edited by

        Unfortunately you cannot merely just add another line to the LexerType. It doesn’t work that way. These all have very specific meanings within the code and it has no idea what styleId 8 is suppose to be.

        1 Reply Last reply Reply Quote 0
        • Lucas ElliottL
          Lucas Elliott
          last edited by

          Okay so StyleID is the type of style not the number? Okay. So now that I know what I can’t do any idea as to what I can do? Heres a pic of what I want: https://postimg.org/image/5c5b4bhbz/

          1 Reply Last reply Reply Quote 0
          • dailD
            dail
            last edited by

            To do what you are wanting would involve alot of code changes to Notepad++ and Scintilla.

            1 Reply Last reply Reply Quote 0
            • Lucas ElliottL
              Lucas Elliott
              last edited by

              okay… Oh well. Feels like a pretty obvious feature. Hope it will be in there some day! thanks for your help.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors