Tapatalk

How to copy text and exclude the hidden lines?

How to copy text and exclude the hidden lines?

9
NewbieNewbie
9

    Mar 06, 2014#1

    In UEStudio 14.10, I performed a search and selected the "Show Lines" option.
    The editor area now shows all the lines containing the searched term and they all have the "+" button in the left margin indicating there are hidden lines.
    I selected all the visible lines from the display area and pasted them into a new tab.
    Unfortunately, the Copy/Paste included the hidden lines.
    Is it possible to Copy/Paste only the visible lines?

    6,685587
    Grand MasterGrand Master
    6,685587

      Mar 07, 2014#2

      Selecting only visible lines which would be of course multiple selections in file and then copying the displayed lines is not possible in UE v21.00 and all previous versions of UltraEdit as well as in UES v14.10 and all previous versions of UEStudio.

      But you can use Edit - Delete - Delete All Hidden Lines and use next File - Save As if you want the visible lines saved into a new file.

      Or if file is saved before running the Find resulting in hiding lines, you can use after the find the command Edit - Delete - Delete All Hidden Lines, then press Ctrl+A and Ctrl+C to copy the remaining lines and use now File - Revert to Saved to restore the original contents of the file.

      Of course both methods work only for a file opened with the usage of a temporary file.

      For very large files opened without usage of a temporary file and therefore the command Edit - Delete - Delete All Hidden Lines makes the changes on original file without the possibility to undo it, it is necessary first to make a copy of the entire file and then perform the Find and the deletion of all hidden lines.

      Finally, with a regular expression replace it is possible to delete the lines of no interest directly.

      Or the find option List Lines Containing String is used to list all lines of interest in a modeless dialog window or a view (depends on version of UltraEdit/UEStudio) and next the command (button or context menu item) for copying the list of found lines to clipboard is used. It would be also possible to use Find in Files to get all lines of interest into a new file.

      And last but not least, one of the scripts available at Find strings with a regular expression and output them to new file can be used to find data or entire lines of interest and get them copied into a new file.
      Best regards from an UC/UE/UES for Windows user from Austria

      19176
      MasterMaster
      19176

        Apr 10, 2014#3

        Hello, there is another way in UEStudio v14.20 and UltraEdit v21.10 (and later versions) with multi-caret feature enabled and full cut/copy/paste support with multiple carets or selections available now.

        Just select all required lines and then press CTRL+LMB (left mouse button) somewhere beyond end of line (EOL). You get as many carets as selected lines (there are some limitation though). Now press SHIFT+HOME and all lines are selected individually. Finally press CTRL+C and that's all.