Community
    • Login

    need a way to mark where the page breaks are

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 1 Posters 232 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.
    • Alan KilbornA
      Alan Kilborn
      last edited by Alan Kilborn

      HERE @Paul-Harouff asked:

      Sometimes I use Notepad++ to edit long plain text files (not code) and I need a way to mark where the page breaks are. How hard would it be to add the capability to highlight line numbers (e.g., put a dot next to 64, 128, 192, etc.)? Or is there a plugin that already adds this capability?

      Here’s one way to do it, with a Mark All operation from the Mark tab on the Find family of windows:

      Find: (?-s)(.*\R){63}\K.*\R
      Wrap around: ticked
      Purge for each search: ticked
      Search mode: Regular expression

      This would highlight every 64th line in red.

      It isn’t dynamic, though, so you’d have to rerun it after changing data.

      1 Reply Last reply Reply Quote 2
      • Alan KilbornA
        Alan Kilborn
        last edited by

        If the 64th line of a group happens to fall on a blank line with no content, the Mark operation would not show that – no text to color red.

        To solve this case, perhaps using “bookmarks” will help. Add this condition to the original Mark All operation:

        Bookmark line: ticked

        This would show like this on an affected line:

        6d95e93c-5c1d-4e36-9d28-fda41ba760c6-image.png

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