How to Select All without selecting the hidden lines?

How to Select All without selecting the hidden lines?

9
NewbieNewbie
9

    Nov 18, 2010#1

    I performed a search and specified to hide the lines matching my search criteria. I then preformed a Select All and Copy operation.
    In a new document, I pasted the clipboard content. The new file contained all the lines from the original document.

    Is it possible to exclude all the hidden lines in a copy operation? Something like Select All Visible Lines, or a configuration option to exclude the hidden lines in a selection range.

    6,603547
    Grand MasterGrand Master
    6,603547

      Nov 18, 2010#2

      It is not possible to select/copy just visible lines in any way.

      But you can copy the entire file and use a regular expression replace all to delete all lines of no interest. Or you do the opposite and run a Find with advanced find option List Lines Containing String to find all lines of interest, copy them to clipboard and paste them into a new file.
      Best regards from an UC/UE/UES for Windows user from Austria

      9
      NewbieNewbie
      9

        Nov 18, 2010#3

        The ability to perform advanced manipulations on visible/hidden lines is something that I hope will find its way in a future release of UE. Here is a simple example of what Kedit For Windows can do;

        Given this simplistic file:

        capable1
        babylonl2
        capricorn3
        delta4
        epsilon5


        Kedit command: all /e (shows all the lines containing the character "e" and fold the other lines. Kedit fold mechanism is a bit different than UE

        capable1
        ==== 2 hidden lines ===== (this line is actually displayed on the screen)
        delta4
        epsilon5

        Kedit command: less /ep

        capable1
        ==== 2 hidden lines =====
        delta4
        ==== 1 hidden line =====

        Kedit command: shadow off (this command hides the "hidden line(s)" lines

        capable1
        delta4

        Now if I do a Ctrl-A (Select All) and a Ctrl-C (Copy) the clipboard will contain the 2 lines shown above. The excluded (hidden lines) will not have been copied to the clipboard.

        Hopefully a future release of UE will go as far as Kedit in term of visible/hidden lines manipulations. Until them, I will have to use both editors.
        Thanks for your reply Mofi.

        6,603547
        Grand MasterGrand Master
        6,603547

          Nov 18, 2010#4

          It would be possible to write a script which copies all visible lines to the clipboard. But it would be horrible slow because the script has to copy and append each line separately to the clipboard. Therefore the two methods I posted are usually better and faster.
          Best regards from an UC/UE/UES for Windows user from Austria

          901
          MasterMaster
          901

            Nov 18, 2010#5

            I would encourage you to email IDM with an enhancement request to support selecting/copying all visible lines. IDM has already recieved requests for multi-select functionality (a selection that contains multiple non-contiguous lines). A selection that excludes hidden lines would fall into the same category. The more requests IDM receives for a particular enhancement, the more likely it is that it will be considered for future development.

            6,603547
            Grand MasterGrand Master
            6,603547

              Dec 06, 2010#6

              I forgot a command very userful here because I rarely hide lines by the Find commands Hide Lines and Show Lines. When UltraEdit is displaying only the lines you are interested in, execute the command Edit - Delete - Delete All Hidden Lines. Now you can use File - Save As to save the remaining lines into a new file, or press Ctrl+A and Ctrl+C to copy them to clipboard.
              Best regards from an UC/UE/UES for Windows user from Austria

              1
              NewbieNewbie
              1

                Jul 13, 2011#7

                Thanks very much for this topic. The various solutions work great. One useful clarification, when using Find with List Lines Containing String do not click on Show Lines or Hide Lines, click on Next or Previous. It is not so obvious but the Next results in a new floating dialog window that lists all the hits. From there use Clipboard button to copy that results list.

                1
                NewbieNewbie
                1

                  Oct 22, 2011#8

                  GSimard wrote:The ability to perform advanced manipulations on visible/hidden lines is something that I hope will find its way in a future release of UE. ......
                  Hopefully a future release of UE will go as far as Kedit in term of visible/hidden lines manipulations. Until them, I will have to use both editors.
                  Actually, you don't have to hide (shadow off) the lines in Kedit. They won't get selected for the copy.

                  I have been using Xedit then Kedit for over 30 years. Still love it very much. I really, really wish that UE could come up with a way to mimic the ALL command because I would like to move totally to UE for my editing needs.

                  60
                  Advanced UserAdvanced User
                  60

                    Oct 24, 2011#9

                    As an old user of Kedit this was a really great feature!!!!!