Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #3903
    nusi
    Member

    I’m a little bit irritated by Find, Find in Files and the search plugin. Their different featuresets and behaviour is what is irritating me.

    This is where my journey has started:
    I did want to remove trailing whitespaces in all .cpp/.h./inl files in a specific folder. In ‘Find in Files’ i entered ‘s+$’ which should match on all lines ending with whitespaces. The search result was (simply said) wrong, as it also found lines which didn’t match above reg-exp.
    I already had another file opened, where I used ‘Find’ (Ctrl-F) to check if my RegExp is ok. The highlights showed only those lines, where I was interested in.
    So irritating point 1 is the different regexp matches for at least above case in ‘Find’ and ‘Find in Files’

    It’s possible to save the search result into a file. However, loading this files does not result in the same behaviour, the files on the left loose their special status (link?) and have a different contextmenu. This is irritating point 2.

    The search plugin doesn’t have the same options as Find, even though it does the same with implicitly ‘Search all open documents’ selected. This is Irritating point 3.

    It’s possible to edit in the search result of Find In Files. However, this really does only change the search result buffer. I’d expect, that it changes the file where the changed line belongs to. In my initial example, the search result contained highlighted lines, because I had already searched once with Find. These highlights there and the ‘special’ handling of the filelist to the left let me think that I could edit within the search result and save the modified file – not just the search result. This is irritating point 4.

    So here are my proposals:
    1. Please explain the difference for regexps in Find in Files and Find more in detail in the manual. Currently there is only something about rn noted. IMHO there should be no differences at all.
    2. Please make it possible to save the search result of Find in Files such that they are more usable than plain text files.
    3. Please give more love to the search plugin. It should also be possible to search with escapes and for whole words.
    4. Please allow us to edit the Find In Files search result such that it doesn’t only edit the search result, but also the files associated with each shown line. You may want to pop a messagebox to ask the user if he wants to edit the search result or the file. It should of course than be possible to specify a default behaviour in the configuration, as I personally wouldnt want this messagebox to come up everytime I use this feature.
    5. Please make search for Regexps and search with Escapes to radiobuttons as these two options seem to be exclusive. The current implementation is only partially implemented correctly. Regexp disables escape, but escape only unchecks regexp.
    6. Find in Files should offer the possibility to open the files in EMEditor right away, not only by clicking each individual search result.
    7. Please consider linking the search result of Find in Files optionally into the search plugin. You may want to add a button to the searchplugin with which you can produce the same formatted document as Find In Files does. You could than add save/load search results into the search plugin (=proposal 2).

    Thats all, thank you for reading.
    Nusi.

    #3904
    Yutaka Emura
    Keymaster

    Thanks for pointing out!

    1. I reproduced your problem, and it is indeed different. For some reason, s+$ can match the last line of documents and one previous line from blank lines. Please use [[:blank:]]+$ instead, which should give you desired results. [[:blank:]] matches only horizontal white spaces while s can match both horizontal and vertical white spaces. I will take a look into this more closely, and see if I can fix this issue.

    2. Create a simple macro like this (JavaScript):

    document.HighlightTag = true;

    Run this macro after reloading a Find in Files result file.

    3. The search plug-in is somewhat premature since the source code is avaialble, and I am encouraging someone to extend this plug-in with more features. If no one is trying to develope the plug-in, I will consider doing that.

    4. 5. 6. 7. I will consider your requests.

    Thanks again!

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.