Community
    • Login

    Highlights in Notepad++

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 3 Posters 4.5k Views 2 Watching
    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.
    • Priya ChilongiaP Offline
      Priya Chilongia
      last edited by

      Hey,

      Is there anyway to save the highlighted text in a notepad++ document. I do style token everytime and save the file, But when reopen it, the highlights are gone.

      Best

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC Offline
        Claudia Frank @Priya Chilongia
        last edited by

        @Priya-Chilongia

        Simple answer, no.

        Npp is coloring code by using lexers. Each time a file gets loaded it is checked if
        there is a lexer available which should color different parts of that file.
        If it is, it will color it.

        If tokens, you have styled, are often or always used you may think about creating
        your own lexer by using the user defined language dialog.
        Put your words into one of the keywords section and assign the color you want.
        Add an extension to the new defined language and every time such a file opens
        the keywords will get colored.

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 0
        • David BaileyD Offline
          David Bailey
          last edited by

          The problem is, where do you put the styling information. I created a named bookmarks plugin that lets you add permanent bookmarks to a file of code in a C-like language. In that case I solved the problem by using special comments to contain the information. I have wondered whether to extend that concept to include styled regions - but that would not work for a file containing some arbitrary data.

          1 Reply Last reply Reply Quote 0

          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