• Login
Community
  • Login

Header plugin

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
4 Posts 3 Posters 649 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.
  • A
    Aleksandr Shchepkin
    last edited by Mar 19, 2024, 7:48 AM

    Hello friends, can you tell me if there is any add-on or plugin for Notepad++ for the following purpose.
    There is a very large text, divided by headings, I need to be able to view all headings and quickly go to them, to the desired place in the text by clicking the mouse.

    M P 2 Replies Last reply Mar 19, 2024, 1:52 PM Reply Quote 0
    • M
      Mark Olson @Aleksandr Shchepkin
      last edited by Mar 19, 2024, 1:52 PM

      @Aleksandr-Shchepkin
      How large of a file is it? 10MB? 100MB or larger? A few hundred KB? Is it plain text, or is it some special file type like INI?

      The best solution is going to depend on your answer to those questions.

      1 Reply Last reply Reply Quote 3
      • P
        PeterJones @Aleksandr Shchepkin
        last edited by Mar 19, 2024, 11:08 PM

        @Aleksandr-Shchepkin ,

        My first thought would be “custom FunctionList” definition. How effective and/or difficult that is will depend on your answers to Mark’s questions.

        But if you have a unique extension (maybe *.myfile), and/or the file is already in a built-in file format or you have a User Defined Language for the file type – maybe the Markdown UDL that ships with N++, for example – then you just need to figure out a regex that will find the “headings”, and then can create a FunctionList definition that will put those in the FunctionList panel . But even if it’s a plaintext .txt file, you can use the functionList\normal.xml to define a Function List rule for even plaintext.

        A 1 Reply Last reply Mar 20, 2024, 7:06 AM Reply Quote 4
        • A
          Aleksandr Shchepkin @PeterJones
          last edited by Mar 20, 2024, 7:06 AM

          Friends, you’ve helped me so much, I’m so happy. I have a txt file with more than 16000 lines, size 1,6 mb. I created an xml file in the functionList folder with the following code:
          <NotepadPlus>
          <functionList>
          <parser displayName=“XML” id=“xml”>
          <function
          mainExpr=“#([^#<]+)”
          displayMode=“$functionName”>
          </function>
          </parser>
          </functionList>
          </NotepadPlus>

          And indeed now, I have a set of headers displayed on the right (the headers start with the # symbol).
          The file is constantly growing, so far everything is working very well, thanks.

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