Community
    • Login

    How do I turn on the colors to improve readability.

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 3 Posters 1.6k 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.
    • Peter SmidsP
      Peter Smids
      last edited by

      9e505cda-20d7-4021-a8c1-a486db9d04c8-image.png

      Mark OlsonM 1 Reply Last reply Reply Quote 0
      • Mark OlsonM
        Mark Olson @Peter Smids
        last edited by

        @Peter-Smids
        This looks like YAML to me. You can turn on the YAML lexer by selecting Language -> YAML from the main menu.

        BEFORE

        f0799af2-56ec-475f-aafc-dc68a67f0056-image.png

        AFTER

        81e7e968-0955-4a9c-8f8a-4466247eab7c-image.png

        Peter SmidsP 1 Reply Last reply Reply Quote 3
        • Peter SmidsP
          Peter Smids @Mark Olson
          last edited by

          That’s right, it’s YAML, but how do I get these colors on?

          yaml.png

          rdipardoR 1 Reply Last reply Reply Quote 0
          • rdipardoR
            rdipardo @Peter Smids
            last edited by

            @Peter-Smids said in How do I turn on the colors to improve readability.:

            That’s right, it’s YAML, but how do I get these colors on?

            A limited number of Notepad++ themes define styles for YAML. You can try one of these, although none of them resemble your screen capture (of Sublime Text…?):

            • DansLeRuSH-Dark
            • DarkModeDefault
            • Deep Black
            • Hello Kitty
            • HotFudgeSundae
            • Khaki
            • MossyLawn
            • Navajo
            • Obsidian
            • Solarized-light
            • Solarized
            • Vim Dark Blue
            • Zenburn

            Assuming you prefer a dark theme, you can customize one from the list (e.g., “Deep Black”) using the Style Configurator:

            yaml-deep-black-styled.png

            Another option is to add the YAML file type to a theme that doesn’t have it yet. First, do some minor customization of the target theme so it gets copied into %AppData%\Notepad++\themes (if N++ is installed for all users; otherwise just look in the themes directory wherever your portable N++ is). Open the theme’s XML file and paste these definitions anywhere under the /NotepadPlus/LexerStyles path:

            <LexerType name="yaml" desc="YAML" ext="">
              <WordsStyle name="DEFAULT" styleID="0" fgColor="ADDB67" bgColor="262626" colorStyle="1" fontName="" fontStyle="0" fontSize="" />
              <WordsStyle name="COMMENT" styleID="1" fgColor="A0A0A0" bgColor="262626" colorStyle="1" fontName="" fontStyle="2" fontSize="" />
              <WordsStyle name="IDENTIFIER" styleID="2" fgColor="82AAFF" bgColor="262626" colorStyle="1" fontName="" fontStyle="1" fontSize="" />
              <WordsStyle name="INSTRUCTION WORD" styleID="3" fgColor="F08080" bgColor="262626" colorStyle="1" fontName="" fontStyle="1" fontSize="" keywordClass="instre1" />
              <WordsStyle name="NUMBER" styleID="4" fgColor="FFC600" bgColor="262626" colorStyle="1" fontName="" fontStyle="0" fontSize="" />
              <WordsStyle name="REFERENCE" styleID="5" fgColor="C0FFFF" bgColor="262626" colorStyle="1" fontName="" fontStyle="0" fontSize="" />
              <WordsStyle name="DOCUMENT" styleID="6" fgColor="E385FF" bgColor="262626" colorStyle="1" fontName="" fontStyle="0" fontSize="" />
              <WordsStyle name="TEXT" styleID="7" fgColor="93CDBA" bgColor="262626" colorStyle="1" fontName="" fontStyle="0" fontSize="" />
              <WordsStyle name="ERROR" styleID="8" fgColor="CD6000" bgColor="FFCE76" colorStyle="1" fontName="" fontStyle="1" fontSize="" />
            </LexerType>
            

            After saving the file and restarting N++, you can customize the newly YAML-aware theme in the Style Configurator.

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