How can I add numbers to the standard ini styler?



  • 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.



  • @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.



  • 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.



  • @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.



  • @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.


Log in to reply