Search (but not replace) in files in directories with no files open

If a user wants to search for a string of text in various files in various directories, and replace instances of that search string with new text, he can easily do so by Edit > Replace (Ctrl + H by default), regardless of whether or not any files are currently open – as it should be. But if the user wants to only search and not do any replacements, then the usual Edit > Find (Ctrl + F) does not work if there are no files currently open. There is no apparent reason for this prerequisite for searching.

One could argue that the user could always do Edit > Replace and simply not make any replacements, but that is not intuitive and also risks accidental replacement, because after the user presses Enter and the search finishes, Komodo IDE seems to make all of the replacements in memory, and then pops up a dialog box asking if the user wants to cancel the changes or continue to make them. If the user misunderstands the dialog and clicks the “Continue” button, then all of the instances of the search string would be replaced by whatever text, if any, that just happens to be in the “Replace” field when the process is started.

This feature request is to change Edit > Find so that it can be used to search through files on disk even if the user does not have any files currently open.

I swear there is already a ticket open for this. This makes total sense to me though I suspect an odd dependency in the Find Service is the reason why the workflow is currently like this and may not be as straight forward as you think. Not that we shouldn’t do it.

  • Carey

Sorry if this is a duplicate request, but my search didn’t find anything similar.

As long as you had a look there is no issue. I was just pointing out that this has come up so you’re not the only one who thinks this way.

  • Carey

Certainly.

Yes, with no files open, I tapped Ctrl + F and was puzzled why nothing happened. :slight_smile:

This maybe?

yep, that looks like it’s the same thing, right @mjross?

  • Carey

Yes, the summary sounds similar to mine, although the subject line makes it sound as if a Find dialog actually appears (because of the reference to the “Where” field), while what I’m seeing is no Find dialog whatsoever.

You have to press Ctrl+F while focused in the Places pane (by selecting an item in it). It’s not working for me w/out the pane though. Sounds like a different issue for me. The one I linked is about that Komodo tries to search in a file when there’s no file opened.

Yes, it sounds like a different issue – but possibly related (in the workflow).

They are the same issue no? You’re both reporting that you want Ctrl+F to work when there are no files open. How are they different?

My issue (the one I linked) is about the Find feature does not work at all when there are no files open because it tries to search in the current document by default and it does not give me a user-friendly message that I should change the “Where” setting. (if you change it to Files or something else, it works).

@mjross reports that the pane does not open at all when there are no files opened. You have to focus on the Places pane to at least OPEN the Find pane. Pressing Ctrl+F when having a selection in the Places pane will open the Find pane with Where: Files, Directories: <the selected directory> options.

I hope I made it clear.

Ahh yes, thanks for clarifying.