Community
    • Login

    Highlight line when // is used

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 442 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.
    • Jonathan RussellJ Offline
      Jonathan Russell
      last edited by

      Hi,

      I am using the Obsidian Style and would like to change the entire row to a different font colour when // is at the start of the line.

      In my INI files when I use # the line’s font will go green.

      When I have // at the start of the line, I would like the font of the line to go to a colour of choice.

      I added this to the INI section of the stylers.xml & also the Obsidian.xml

      <WordsStyle name="Backslash" styleID="5" fgColor="00800" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
      

      How do I define the //? This is where I am unsure.

      Thanks for the help in advanced.

      EkopalypseE 1 Reply Last reply Reply Quote 0
      • EkopalypseE Offline
        Ekopalypse @Jonathan Russell
        last edited by Ekopalypse

        @Jonathan-Russell

        what can be styled or not is defined by the lexer, which means you
        cannot add some random tokens to an existing lexer configuration.
        In order to be able to treat your forwardslashes you must either

        1. write your own lexer
        2. write your own user defined language (menu language->define your language…) or
        3. use a scripting language like PythonScript to tweak the builtin lexers or UDLs.

        Each of them have their pro and cons and which one fits your requirements depends on your knowledge about programming
        and the will for implementation.

        1 Reply Last reply Reply Quote 1

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors