## Search & Replace

Search & Replace in texts has always been a pet-peeve in text editors and word processors. The process of performing a multi-document replace of a person's name, for example, is very dangerous, because one never knows if the name doesn't exist as part of a larger word.

An Example: You might want to switch "man" for "woman". Project-wide, going feminist. ;) Of course, you wouldn't want to replace "mankind" for "womankind", and neither replace "Norman" with "Norwoman". Some might argue here, of course.

However, common S&R-mechanics will let you search for "man" and then present a list of documents which feature that term. You will then need to check each occurrence for relevance – a tedious task, error-prone. This is the document-centric approach to Search & Replace.

Ulysses takes a different approach by presenting the search results purely term-centric. For instance, if you search for the term "man", you will get a list which shows every single word that features that term: manual, manage, command, and so on.

This search approach works everything you ever type into Ulysses: texts, notes and excerpts. If you only want to search for one of these types, click on the magnifier and select the wanted type. If you want to search your texts, notes and excerpts at once, use the "Whole Document".

This is only one side of Search & Replace in Ulysses. Besides searching for texts you can also Search & Replace in Styles and Markers. To enable this search, click on the magnifier in the search box and select "Styles". You can now use the drop-down boxes to select the Style or Marker you want to replace. This way you can convert the various Styles and Markers into each other.

- How do I invoke Search & Replace?
  - You can invoke Search & Replace in various ways.
    - Select "Search and Replace..." from the "Project"-menu.
    - Hit Command-R on the keyboard.
    - Select the corresponding icon from the toolbar.
- How does Search & Replace for texts work?
  - Short answer: Type a term into the search field. The list will get populated with occurrences of that term. Select an occurrence to view it in context. Double-click on an occurrence to open the document which contains the term; the first occurrence will be highlighted/selected.
    If you want to replace an occurrence with another term, tick the occurrence's checkbox, type the new term into the Replace field and hit the "Replace" button.
- How does Search & Replace for Styles and Markers work?
  - Click the magnifier next to the search field, select "Styles", then select the Style you want to search & replace using the drop-down boxes on the top. The list will now get populated with occurrences of the Style. Working with this list is pretty much the same as in Search & Replace for texts: Double-Clicking an occurrence will open the document containing the Style and its first occurrence will be highlighted/selected.
    To replace a Style, check the occurrence's checkbox of the Style first, select the new Style using the drop-down boxes on the bottom and click the "Replace" button.
- How can I perform a Search & Replace action on the whole project?
  - In order to perform a Search & Replace action on the whole project, either make sure to deactivate the Filter Button or select "All" within the Filter View.
- I know that more documents contain the search term. Why aren't they shown in the results?
  - Search & Replace works on the documents shown in the Browser. So if you have selected a Filter or Collection, Search & Replace will only work on the documents contained within these groups.
- Some documents and/or occurrences can not be ticked. What gives?
  - Open documents (i.e. tabs) can be searched, but Ulysses will not touch their contents via Search & Replace.
- How do I tick all occurrences? CTS, man...
  - To tick all occurrences at once, Option-Click one checkbox. Be aware though, that this will really and truly replace every occurrence with the new term. Be careful. :)