Skip to content

Commit

Permalink
Find in Files improvements (#763)
Browse files Browse the repository at this point in the history
* FiF Clarification
Buffer contents are searched, not filesystem contents, when the file is open in Notepad++

* Follow current doc:
change "was moved" to "was moved and renamed"

* FiF Directory: clarify << vs FollowCurrentDoc
  • Loading branch information
pryrt authored Feb 11, 2025
1 parent b8b9e50 commit c0c2ba5
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions content/docs/searching.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,17 @@ To find only files that have no extension, you cannot just say `*.` despite this

The **Directory** is the containing folder for where to search. It has three options that affect its behavior:

* **☐ Follow current doc** ⇒ If checked, it will default to searching the folder that contains the current active document.
- In v8.7.4 and earlier, if this is checked, it will initialize the Directory to "default" to the current document's directory when you first launch **Find in Files** dialog, or if you toggle the checkbox off and then back on. (Note that "first launch" means that if you change the active tab while the dialog is still open, the Directory field will not change.) If you manually change the directory (either through typing, or using the `...` button), it will search the newly-entered directory, rather than using the directory it defaulted to. The next time you launch the dialog, it will update the default directory again (assuming the option is still checked).
* **<<** ⇒ This button will "fill directory field based on active document" (as the hover-text explains), so you can manually re-populate the Document field based on the current document, even if you have changed the document. (new to v8.7.5)
* **☐ Follow current doc** ⇒ (removed v8.7.5) If checked, it will default to searching the folder that contains the current active document.
- If this option exists and is checked, it will initialize the Directory to "default" to the current document's directory when you first launch **Find in Files** dialog, or if you toggle the checkbox off and then back on. (Note that "first launch" means that if you change the active tab while the dialog is still open, the Directory field will not change.) If you manually change the directory (either through typing, or using the `...` button), it will search the newly-entered directory, rather than using the directory it defaulted to. The next time you launch the dialog, it will update the default directory again (assuming the option is still checked).
- The state of this checkbox is saved in a config file (the `fifFolderFollowsDoc` attribute in `config.xml`), so your choice for this option _is_ remembered from one run of Notepad++ to the next.
- In v8.7.5, this checkbox was moved to **[Settings > Preferences > Searching](../preferences/#searching) > ☐ Fill Find in Files Directory Field Based On Active Document**. This version also added a **<<** button which, as the hover says, will "Fill directory field based on active document", so you can manually re-populate the Document field based on the current document, even if you have changed the document.
- In v8.7.5, this checkbox was moved and renamed to **[Settings > Preferences > Searching](../preferences/#searching) > ☐ Fill Find in Files Directory Field Based On Active Document**.
* **☐ In all sub-folders** ⇒ If checked, it will recursively search sub-folders of the given folder.
* **☐ In hidden folders** ⇒ If checked, it will search hidden sub-folders as well as normally-visible sub-folders.

If there is no **Directory** defined, Notepad++ will have nothing to search. Starting in v8.7.6, if the **Directory** field is empty when you click **Find All**, Notepad++ will move the dialog input focus to the **Directory** field, to make it more clear that you need to tell it what directory to search.
If there is no **Directory** defined, Notepad++ will have nothing to search. Starting in v8.7.6, if the **Directory** field is empty when you click **Find All**, Notepad++ will move the dialog input focus to the **Directory** field, to make it more clear that you need to tell it what directory to search.

**Note**: During **Find in Files**, the contents of the editing-buffer in Notepad++ take priority over what's on disk for whether or not there is a match in a given file. For example, assume that `editme.txt` originally just said `foo`, but that you have `editme.txt` open and have added the word `blah` but not yet saved it; if you **Find in Files** for `blah` in the directory that includes `editme.txt`, it will show that `editme.txt` contains a match, even though the file on disk does not, because Notepad++'s editing-buffer for that file _does_ contain the text. To say it another way, if the file is being edited in Notepad++, the **Find in Files** search will use the content that Notepad++ sees, regardless of whether the saved file on your computer's filesystem contains a match.

### Find in Projects tab

Expand Down

0 comments on commit c0c2ba5

Please sign in to comment.