Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Removing multiple blank lines

    Help wanted · · · – – – · · ·
    3
    5
    45
    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.
    • Gerd Selter
      Gerd Selter last edited by

      I am looking for a way to replace multiple consecutive blank lines with a single blank line via find/replace or macro. Unfortunately, I could not find anything about this anywhere and wonder if this is even possible.
      If someone has an idea about this, then always here with it :-)

      Alan Kilborn 1 Reply Last reply Reply Quote 0
      • Alan Kilborn
        Alan Kilborn @Gerd Selter last edited by

        @Gerd-Selter

        Find: ^(\R)+
        Replace: ${1}
        Search mode: Regular expression

        There are certainly other expressions that will do it as well.

        Gerd Selter 1 Reply Last reply Reply Quote 3
        • Gerd Selter
          Gerd Selter @Alan Kilborn last edited by

          @Alan-Kilborn Thanks, works great

          1 Reply Last reply Reply Quote 0
          • namx3249
            namx3249 last edited by

            and why don’t use command from Edit - Line operations - Remove empty lines ?

            you can also assign a keyboard letter for this command …

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

              @namx3249 said in Removing multiple blank lines:

              and why don’t use command from Edit - Line operations - Remove empty lines ?

              Because OP wanted a “single blank line” to remain after the operation.

              1 Reply Last reply Reply Quote 2
              • First post
                Last post
              Copyright © 2014 NodeBB Forums | Contributors