Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Remove white space - empty lines - in editor

Remove white space - empty lines - in editor

Scheduled Pinned Locked Moved C / C++ / MFC
question
12 Posts 5 Posters 19 Views 1 Watching
  • 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    WARNING Way off, in the left field, the coding subject - relax , I am NOT posting any coding questions... The attached code , which I could not post to show "visualize white space " setting contains plenty of white space. The editor has an option to "remove white space" , but only in actual line of code . which "auto indent" happily recreate... The "remove white space" DOES NOT remove empty lines... I am asking - is this normal in any decent editor NOT to have an option to remove "white space" in between lines of code? Or does such option exists and I have no idea what it would be called. { qDebug()<< "Current raw text " << resultClean; str= SubRegularExpressionExt("((\\w+)$)", resultClean,2 ); //TOK line qDebug()<< "Current extracted text ((\\w+)$)" << str; str= SubRegularExpressionExt("(\\w+)*", resultClean,2 ); //TOK line qDebug()<< "Current extracted text (\\w+)*" << str; str= SubRegularExpressionExt("(\\w+)", resultClean,2 ); //TOK line qDebug()<< "Current extracted text (\\w+)" << str; //"((\\w+)\\s*)*", str= SubRegularExpressionExt("((\\w+)\\s*)*", resultClean,2 ); //TOK line qDebug()<< "Current extracted text ((\\w+)\\s*)*" << str; }

    D T 2 Replies Last reply
    0
    • L Lost User

      WARNING Way off, in the left field, the coding subject - relax , I am NOT posting any coding questions... The attached code , which I could not post to show "visualize white space " setting contains plenty of white space. The editor has an option to "remove white space" , but only in actual line of code . which "auto indent" happily recreate... The "remove white space" DOES NOT remove empty lines... I am asking - is this normal in any decent editor NOT to have an option to remove "white space" in between lines of code? Or does such option exists and I have no idea what it would be called. { qDebug()<< "Current raw text " << resultClean; str= SubRegularExpressionExt("((\\w+)$)", resultClean,2 ); //TOK line qDebug()<< "Current extracted text ((\\w+)$)" << str; str= SubRegularExpressionExt("(\\w+)*", resultClean,2 ); //TOK line qDebug()<< "Current extracted text (\\w+)*" << str; str= SubRegularExpressionExt("(\\w+)", resultClean,2 ); //TOK line qDebug()<< "Current extracted text (\\w+)" << str; //"((\\w+)\\s*)*", str= SubRegularExpressionExt("((\\w+)\\s*)*", resultClean,2 ); //TOK line qDebug()<< "Current extracted text ((\\w+)\\s*)*" << str; }

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Yes, the option to remove blank lines doesn't usually exist.

      Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
      Dave Kreskowiak

      L P 2 Replies Last reply
      0
      • D Dave Kreskowiak

        Yes, the option to remove blank lines doesn't usually exist.

        Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
        Dave Kreskowiak

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Answering questions is also a skill , especially without unasked / uncalled for preaching and other innuendos and insults. Have a swell day and do not quit your day job.

        D 1 Reply Last reply
        0
        • L Lost User

          Answering questions is also a skill , especially without unasked / uncalled for preaching and other innuendos and insults. Have a swell day and do not quit your day job.

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          I all I did was answer your question. What the :elephant: did i do wrong?

          Quote:

          I am asking - is this normal in any decent editor NOT to have an option to remove "white space" in between lines of code?

          Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
          Dave Kreskowiak

          L 1 Reply Last reply
          0
          • L Lost User

            WARNING Way off, in the left field, the coding subject - relax , I am NOT posting any coding questions... The attached code , which I could not post to show "visualize white space " setting contains plenty of white space. The editor has an option to "remove white space" , but only in actual line of code . which "auto indent" happily recreate... The "remove white space" DOES NOT remove empty lines... I am asking - is this normal in any decent editor NOT to have an option to remove "white space" in between lines of code? Or does such option exists and I have no idea what it would be called. { qDebug()<< "Current raw text " << resultClean; str= SubRegularExpressionExt("((\\w+)$)", resultClean,2 ); //TOK line qDebug()<< "Current extracted text ((\\w+)$)" << str; str= SubRegularExpressionExt("(\\w+)*", resultClean,2 ); //TOK line qDebug()<< "Current extracted text (\\w+)*" << str; str= SubRegularExpressionExt("(\\w+)", resultClean,2 ); //TOK line qDebug()<< "Current extracted text (\\w+)" << str; //"((\\w+)\\s*)*", str= SubRegularExpressionExt("((\\w+)\\s*)*", resultClean,2 ); //TOK line qDebug()<< "Current extracted text ((\\w+)\\s*)*" << str; }

            T Online
            T Online
            trønderen
            wrote on last edited by
            #5

            First:

            Member 14968771 wrote:

            I am asking - is this normal in any decent editor NOT to have an option to remove "white space" in between lines of code?

            being answered with

            Yes, the option to remove blank lines doesn't usually exist.

            is a direct, clear answer to your question, and certainly doesn't justify your reaction:

            Answering questions is also a skill , especially without unasked / uncalled for preaching and other innuendos and insults.

            I have no idea why you show this kind of reaction to a simple (and correct) answer to exactly what your were asking for. Then: To remove blank lines in Notepad++, I first delete all trailing spaces at end of lines (NP++ has a command for that). Then I replace two consecutive newlines with one newline. NP++ can handle both ISO standard, Mac and *nix newlines, and you have to specify the correct format for the search to match, and you have to select 'Search mode: Extended'. I guess that any editor that can match on newlines of various kinds can be used in a similar way to remove blank lines.

            D 1 Reply Last reply
            0
            • D Dave Kreskowiak

              I all I did was answer your question. What the :elephant: did i do wrong?

              Quote:

              I am asking - is this normal in any decent editor NOT to have an option to remove "white space" in between lines of code?

              Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
              Dave Kreskowiak

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              14968771 often answers like that. Similarly gives instructions in his questions as to how you must answer.

              D 1 Reply Last reply
              0
              • L Lost User

                14968771 often answers like that. Similarly gives instructions in his questions as to how you must answer.

                D Offline
                D Offline
                Dave Kreskowiak
                wrote on last edited by
                #7

                Wow. The quality of the question directly dictates the quality of the answer.

                Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
                Dave Kreskowiak

                L 1 Reply Last reply
                0
                • D Dave Kreskowiak

                  Wow. The quality of the question directly dictates the quality of the answer.

                  Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
                  Dave Kreskowiak

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  IIRC a few years ago he actually complained about this in Bugs 'n' Sugs. :rolleyes:

                  D 1 Reply Last reply
                  0
                  • L Lost User

                    IIRC a few years ago he actually complained about this in Bugs 'n' Sugs. :rolleyes:

                    D Offline
                    D Offline
                    Dave Kreskowiak
                    wrote on last edited by
                    #9

                    :laugh:

                    Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
                    Dave Kreskowiak

                    1 Reply Last reply
                    0
                    • T trønderen

                      First:

                      Member 14968771 wrote:

                      I am asking - is this normal in any decent editor NOT to have an option to remove "white space" in between lines of code?

                      being answered with

                      Yes, the option to remove blank lines doesn't usually exist.

                      is a direct, clear answer to your question, and certainly doesn't justify your reaction:

                      Answering questions is also a skill , especially without unasked / uncalled for preaching and other innuendos and insults.

                      I have no idea why you show this kind of reaction to a simple (and correct) answer to exactly what your were asking for. Then: To remove blank lines in Notepad++, I first delete all trailing spaces at end of lines (NP++ has a command for that). Then I replace two consecutive newlines with one newline. NP++ can handle both ISO standard, Mac and *nix newlines, and you have to specify the correct format for the search to match, and you have to select 'Search mode: Extended'. I guess that any editor that can match on newlines of various kinds can be used in a similar way to remove blank lines.

                      D Offline
                      D Offline
                      DerekT P
                      wrote on last edited by
                      #10

                      My guess is that Member 14968771 does not realise that what's below the horizontal line is simply Dave's signature. He's reading it as a personalised response to his question, misconstruing it entirely and taking it as a personal dig.

                      Telegraph marker posts ... nothing to do with IT Phasmid email discussion group ... also nothing to do with IT Beekeeping and honey site ... still nothing to do with IT

                      L 1 Reply Last reply
                      0
                      • D DerekT P

                        My guess is that Member 14968771 does not realise that what's below the horizontal line is simply Dave's signature. He's reading it as a personalised response to his question, misconstruing it entirely and taking it as a personal dig.

                        Telegraph marker posts ... nothing to do with IT Phasmid email discussion group ... also nothing to do with IT Beekeeping and honey site ... still nothing to do with IT

                        L Offline
                        L Offline
                        Lost User
                        wrote on last edited by
                        #11

                        He gives offence freely, and takes it at the drop of a hat.

                        1 Reply Last reply
                        0
                        • D Dave Kreskowiak

                          Yes, the option to remove blank lines doesn't usually exist.

                          Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
                          Dave Kreskowiak

                          P Offline
                          P Offline
                          PIEBALDconsult
                          wrote on last edited by
                          #12

                          Yeah, "working as expected".

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups