List Lines Containing String enhancements

List Lines Containing String enhancements

112
Power UserPower User
112

    Mar 22, 2006#1

    Hi,

    It seems to me that a few simple enhancements would greatly improve the utility of the "Lines containing find string:" child window.

    1) It might be an idea to actually list the find string in the title... (I might have got it wrong!) and which file it refers to (I often move between files after having done a search - investigating issues etc).

    2) A count of the number found would be useful... This is because (especially with highly indented text - like XML) the found items may be "off screen" and thus not visible.

    3) The ability to optionally have (target) line numbers displayed would also be useful (to get an idea of where things were found in the file)

    4) The ability to switch to (and from) a "slim" version of the window would also be helpful. (Perhaps, just the find string, count and buttons). If you have a large child window, you may want to release some screen real estate (temporarily) without having to repeat the search - which may generate different results because the file has changed since the search started. Since this is not a dockable window (why not? - the output window is) it is more problematic than the other ones.

    5) The ability to select text in the window would also be very handy...

    If users support (any of) these ideas, I'll submit a formal request to IDM , referencing this topic.

    Paolo
    There is no such thing as an inconsistently correct system...
    Therefore, aim for consistency; in the expectation of reaching correctness!

    3
    NewbieNewbie
    3

      Jul 06, 2006#2

      Count would be very useful. A "filter" to include lines *not* containing a string would also be helpful.

      6,684586
      Grand MasterGrand Master
      6,684586

        Dec 13, 2008#3

        PaoloFCantoni wrote:3) The ability to optionally have (target) line numbers displayed would also be useful (to get an idea of where things were found in the file)
        That feature was introduced with UltraEdit v14.20.
        Best regards from an UC/UE/UES for Windows user from Austria

        61
        Advanced UserAdvanced User
        61

          Aug 12, 2009#4

          It would be great if UE could bookmark lines containing the string or expression.

          119
          Power UserPower User
          119

            Aug 12, 2009#5

            It can. Press the "Bookmark All" button in the window that shows the matching lines.

            But the number of bookmarks is limited. See topic Is there a limit for bookmarks per file?

            6,684586
            Grand MasterGrand Master
            6,684586

              Mar 02, 2010#6

              idfubar wrote:A "filter" to include lines *not* containing a string would also be helpful.
              This feature is available starting with UltraEdit v16.00, see power tip Hide, Show, and Delete Found Lines in UltraEdit/UEStudio.
              Best regards from an UC/UE/UES for Windows user from Austria

              5
              NewbieNewbie
              5

                Apr 16, 2012#7

                I work on very big files and this approach does not scale well! Hide/Show takes forever to execute!

                I'd rather see a "bookmark all" button instead. Something that is easy on the resources and can work with hundred of thousands bookmarks.

                6,684586
                Grand MasterGrand Master
                6,684586

                  Apr 16, 2012#8

                  Working on large or even huge text files with several hundred MB or even GB should be done with UltraEdit only after special configuring UE for this task. The IDM power tip large file text editor as well as some forum topics explain how to configure UltraEdit for editing large files.

                  I have read several times in the last years complaints of UltraEdit users about speed on large files. What I have never understood is that most of those users do not use the text editor UltraEdit for editing the files, they use UE for just viewing large log files, or large CSV files, or large fixed column text files (text files with constant number of characters per line). The CSV and fixed column text files are usually created by an export from a large database.

                  A text editor is designed for editing tasks and not for viewing tasks. Therefore a text editor can't be as good as an application designed for just displaying text files for viewing and searching something in large files. From time to time I have to look something in log files too. But I never open the log files in UltraEdit because I don't want to edit them.

                  My favorite file manager Total Commander has built-in a lister tool. This lister just offers what I need when looking on a log file: display the text, offer me to search for something within the text, select something and copy the selection. The text is displayed (by default) simply as black text on white background (colors can be configured). No syntax highlighting, no folding, no feature to hide lines, no line numbers (which means no line counting on scroll necessary), just pure text and a simple to use search feature for looking on something in the text file. The advantage of this pure viewer tool within Total Commander: it is fast, very fast. The lister is also available as free standalone tool if somebody is interested in.

                  However, you use very limited Windows Explorer as file manager and the extremely powerful text editor UltraEdit for working with text files. Therefore you are not interested in applications designed for quickly viewing text files because you think that should be also possible with UltraEdit.

                  Well, there are methods to view efficiently large files also with UltraEdit. But first it is important to disable usage of a temporary file for large text files and disable line counting as explained in the power tip. UltraEdit can't be as fast as lister in Total Commander if for example a search for a string is executed where the lister of Total Commander needs just search for this text and display the block around the found occurrence while UltraEdit has to additionally check every byte from current position in the file to the found occurrence to determine if it is a carriage return or a linefeed to show the user finally also on which line within the file the string was found. Line respectively record counting is easy in databases designed for an easy jump from one record to next record by simply adding a fixed offset to file pointer. But a text editor can't do that if every line (record) can have every length from 0 to file size.

                  The easiest method to look on something in a large file with UltraEdit is to simply search for a string of interest and user F3 for searching for next occurrence or Ctrl+F3 for searching backwards for previous occurrence. Lines of no interest should not be removed or hidden because that requires an action on the entire large file most often not really needed. Just ignore the lines of no interest.

                  Many users often use a special find feature to reduce the number of lines and then search with their eyes and brains. Why this inefficient 2 step process? Why not searching directly with the application for the lines of interesting instead of filtering and then searching with the results with own brain? I have never understood that. An application is faster finding something on lines than our human brain. The only exception is when not really knowing what to look for. But even in this case it is according to my experience better to run several finds with different search strings than starting analyzing all lines of a text file with my brain.

                  It is possible with a single hotkey execution to select the entire line containing a found string to get a better focus on the line. But with active line highlighting this is not really needed as also searching with a regular expression which matches an entire line containing a string of interest. Regular expression search are always slower than simple, non regular expression searches. And simple case sensitive text searches are the fastest searches at all.

                  But you might want nevertheless a filtered output of a large file. Well, in this case there are several options to get such a filtered output:
                  • Use a Find with buttons Hide Lines or Show Lines. I can't recommend that for large files where the search string is found very often.
                  • Use a Find with the option List Lines Containing String. That is quite fast and the found lines are written into a resizable dialog window (UE < 18.00) or a dockable window (UE >= 18.00) for further processing (with human brain). I can't recommend using this option if the searched string is found very often in a large file.
                  • Use a regular expression Replace All to delete all lines not of interest. This opposite method in comparison to above can be faster, but it modifies the file and an undo is not possible if the large file is opened without using a temporary file for fast opening and fast modifications.
                  • Use a Find in Files with found lines written to output window. It is possible to run a Find in Files just on all open files which is on a single file if no other files are currently opened in UltraEdit.
                    And even if other files are opened, Find in Files can be executed on a single file if first full name of a file is copied with Edit - Copy Full Path/Name to Windows clipboard, then the Find in Files dialog is opened, the Directory path is cleared and the full file name is pasted into the edit field of In Files/Types.
                    The found lines can be viewed in the output window. A double click on a line results in showing this line in the document window. And it is possible with pressing Ctrl+Shift+Down/Up to get the next/previous line in output window displayed in the document window without moving focus to output window or moving the fingers from the keyboard.
                    The format of the output can be customized at Advanced - Configuration - Search - Set Find Output Format.
                  • Similar to above a Find in Files can be used to get the found lines written to a document window. The lines in this results file can be viewed like the file itself. Additionally when file name and line number are also present on every found line, it is possible to jump to this line in the source file by right clicking on the file name and using first option in context menu or by executing the hotkey assigned to command FileOpenFileUnderCursor.