Community
    • Login

    Text paragraph (re)formatting (and justification): how do it?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    6 Posts 5 Posters 3.8k 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.
    • Luca MatteiniL
      Luca Matteini
      last edited by

      Many years ago I used a lot MultiEdit, which had a very convenient feature for paragraph reformatting, where at the press of key combination it reformatted the paragraph of text for line breaking at the right limit you set (say at column 80), and following the indentation at the beginning of paragraph.
      That’s very useful when editing long plain text, or long comments.

      Is there anything like that in a plug-in?
      The setting for Preferences/Editing/Vertical Edge is just visual?

      Eric PementE 1 Reply Last reply Reply Quote 0
      • Jim DaileyJ
        Jim Dailey
        last edited by

        Yes, the vertical edge is just a visual cue.

        If you only care about seeing long lines on the screen (as opposed to actually inserting newlines into the file), you can turn on the word wrap feature: View->Word wrap.

        Luca MatteiniL 1 Reply Last reply Reply Quote 0
        • Luca MatteiniL
          Luca Matteini @Jim Dailey
          last edited by

          @Jim-Dailey oh well, I actually wanted to reformat text while typing, not just having the visual word wrap (that anyway fits line continuation to window’s width).
          Let’s see if anyone’s eager to add these features in a plug-in, I don’t think I’d have time to write one myself right now :)

          1 Reply Last reply Reply Quote 0
          • Eric PementE
            Eric Pement @Luca Matteini
            last edited by

            @Luca-Matteini said in Text paragraph (re)formatting (and justification): how do it?:

            Many years ago I used a lot MultiEdit, which had a very convenient feature for paragraph reformatting, where at the press of key combination it reformatted the paragraph of text for line breaking at the right limit you set (say at column 80), and following the indentation at the beginning of paragraph.
            That’s very useful when editing long plain text, or long comments.

            Is there anything like that in a plug-in?
            The setting for Preferences/Editing/Vertical Edge is just visual?

            There is a way to do that in Notepad++, but it’s not a one-key command.

            First, choose a right margin where paragraphs should wrap. Using the menubar, go to “Settings > Preferences > Margins/Border/Edge > Vertical Edge Settings”. Enter a positive integer and click “Close”. You should see a thin vertical line on screen after doing this.

            Next, assuming that paragraphs will be separated by blank lines, navigate to a excessively long line to be reformatted (i.e., converted to a wrapped paragraph). Move the cursor into the line so the line is highlighted. Type Control-I (menu: “Edit > Line Operations > Split line”). This will split the line into a multiple lines at the right-margin setting.

            Otherwise, find a paragraph (a block of 2 or more contiguous lines) to reformat. Reformatting is a 3-step process which can be done very quickly.

            (1) Using the mouse, triple-click the top line of the paragraph. This marks the entire line.

            (2) Hold down the shift key and move the mouse to the end of the last line of the paragraph. Left-click again. This marks the entire paragraph as a block.

            (3) Type Control-J, Control-I (menu: “Edit > Line Operations > Join lines” followed immediately by “Split lines”). This will unformat and reformat the paragraph.

            Maybe somebody here knows how to convert this into a macro.

            PeterJonesP 1 Reply Last reply Reply Quote 0
            • PeterJonesP
              PeterJones @Eric Pement
              last edited by

              @Eric-Pement said in Text paragraph (re)formatting (and justification): how do it?:

              There is a way to do that in Notepad++, but it’s not a one-key command.

              In 2025, yes.

              But, in defense of the original answers: In 2016, when the question was asked, that feature didn’t yet exist.

              But, yes, that definitely works now, so thanks for sharing the sequence.

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

                Some related discussions, in these topics:

                • https://community.notepad-plus-plus.org/topic/20008
                • https://community.notepad-plus-plus.org/topic/19395
                • https://community.notepad-plus-plus.org/topic/20319
                1 Reply Last reply Reply Quote 1
                • First post
                  Last post
                The Community of users of the Notepad++ text editor.
                Powered by NodeBB | Contributors