• Login
Community
  • Login

Highlights in Notepad++

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
3 Posts 3 Posters 4.1k 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.
  • P
    Priya Chilongia
    last edited by Feb 9, 2017, 9:54 PM

    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

    C 1 Reply Last reply Feb 9, 2017, 11:23 PM Reply Quote 0
    • C
      Claudia Frank @Priya Chilongia
      last edited by Feb 9, 2017, 11:23 PM

      @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
      • D
        David Bailey
        last edited by Feb 17, 2017, 9:04 PM

        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
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors