Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    How to set a global comment style?

    Help wanted · · · – – – · · ·
    2
    2
    54
    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.
    • PaulStSmith
      PaulStSmith last edited by

      I’ve searched but could not find anything related to this.

      How do I set a default comment (or keyword, or whatever) text style (font, font-style, color, etc.) style for ALL languages at once?

      I know how to set for one specific language, but I’d like to be able to set one style for the entire N++ and than go language by language.

      Thanks in advance.

      PeterJones 1 Reply Last reply Reply Quote 0
      • PeterJones
        PeterJones @PaulStSmith last edited by

        @PaulStSmith ,

        The reason you could not find it documented anywhere is that there is no easy way to do that. One of the problems is not all the COMMENTs (for example) have the same style ID or same exact name in every language; and not every language has a COMMENT. (It’s one of the reasons that designing a whole style takes effort, rather than just a couple quick tweaks.)

        If you wanted to change something like that, you could open up %AppData%\Notepad++\stylers.xml and do a series of regex-based search-and-replace like

        • FIND = (?i-s)(name="COMMENT.*?fgColor)=".{6}"
          REPLACE = ${1}="XXXXXX"
          SEARCH MODE = Regular Expression

        (that will replace the foreground for any style name that starts with COMMENT with the color XXXXXX of your choice)

        You would then have to do that for every style name that is reasonably consistent throughout all the language style definitions.

        1 Reply Last reply Reply Quote 2
        • First post
          Last post
        Copyright © 2014 NodeBB Forums | Contributors