Community
    • Login

    How can I add numbers to the standard ini styler?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    5 Posts 2 Posters 934 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.
    • bege10B
      bege10
      last edited by

      The styler for ini files does not highlight numbers. How can I add this?
      I added a line to stylers.xml with a definition for numbers like in the definition of other languages. Now “NUMBER” shows up in the style editor, but it has no effect on ini files.

      Meta ChuhM 1 Reply Last reply Reply Quote 0
      • Meta ChuhM
        Meta Chuh moderator @bege10
        last edited by Meta Chuh

        @bege10

        for this it might be best if you create a simple custom user defined language (udl) at language > define your language where you can set the colour and boldness you like, by just selecting it at the number style section.
        you can also set the default extensions that activate this udl.

        have a look and play around a bit, it’s quite easy and powerful.
        if you have any questions about creating a udl, don’t hesitate to ask.

        1 Reply Last reply Reply Quote 1
        • bege10B
          bege10
          last edited by

          Thank you.
          Unfortunately it is not that easy for me. I read the documentation and numbers, operator and keywords are OK, but I cannot define the sections:
          headers “[SECTION_NAME]” (brackets and name in same font)
          contents (following lines until next header).

          And ini files are the most easy ones. How should I define a more complicated language?
          What I miss is a feature to import an existing default styler to start with.

          Meta ChuhM 1 Reply Last reply Reply Quote 0
          • Meta ChuhM
            Meta Chuh moderator @bege10
            last edited by

            @bege10 said:

            headers “[SECTION_NAME]” (brackets and name in same font)

            this is to set at any of the delimiter sections, like delimiter 1.
            type [ in the “open” field and ] in the “close” field, to highlight those characters including everything between them

            contents like = or ; can be set at operators 1. you can set many at the same field by separating them with a space.

            special content like a word called NAME can be added to the keywords, all other content will be black, same as the original ini lexer.

            bege10B 1 Reply Last reply Reply Quote 2
            • bege10B
              bege10 @Meta Chuh
              last edited by

              @Meta-Chuh

              Now I have comments and the section headers, operator “=”, numbers and a few keywords.
              Only the comments are foldable, still missing is that the header and the contents of a section is foldable together. They are not connected yet as they are in the original lexer.

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