Find and Replace Improvement Request

Hello,

I recently worked on a document where I needed to change the color of a word that appeared in multiple locations. However, the current feature only allows for word replacement and doesn’t enable highlighting or changing the text color of multiple places simultaneously.

Please include this feature in the upcoming updates. Thank you.

Well, Project Search would find each instance and highlight such a word.
It would also return/list the documents in which the word is found, even in multiple instances per document.
Other than that, why would you want to change the colour of a word in your text?

For quick visual reference and distinction, I change the color of “John” in documents and other documents to find sections related to that word. This makes it easier to distinguish between different instances of the word when reading the document, similar to how WhatsApp uses color-coding for messages.

Right. My solution works in Scrivener, exactly as described. For printouts, not.

One way this can be done is by using File / Sync / with External Folder and then open the resulting file(s) in a third party app the likes of LibreOffice which’s find function is able to select all instances at once and modify them in bulk.
Once back in Scrivener and synced, the changes would reflect in the editor.

Two possible ways to do this.

If you want to find the section, rather than the word specifically, use a keyword. That’s what they’re for.

If you want to assign a changeable color to a specific word, use a Style. Change the Style color to change all words to which that Style is assigned.

1 Like

Or get one of the boffins to string a RegEx (Regular Expression) together to do this for you.

That’s what I do at the moment, but would be good if we wouldn’t have to do that.

Could you please explain how this would work in a conversation-style document? I attempted to use this feature, but it only modified the selected part, not the related document.

“This?” I made two different suggestions.

You might also clarify what you’re attempting to achieve.

“This” I meant the solutions you provided. What I’m trying to achieve is already written in this thread, but to make it more clear, I’m trying to color words same way like you replace them using find and replace tool.

Why don’t you try Project Find like I suggested?
In essence, irrespective of what you find (literally within a second or two), the Editor is still fully functional, so you can add paragraphs, delete content, change what you like, click between documents, and you’ll even find that if your search criteria is John, as soon as you type John again and again, it will be highlighted that word again and again, and all instance be immediately highlighted when you click into a document. Even deleting any instance of John or altering it to Sam won’t break the search. And when you finish what you intended doing with content around John and click out of search mode, the highlighting will simply vanish.
You want to find John, by way of example, but why? Say why Project Search won’t work for you. It’s a quick and easy and even has a dedicated icon. If it’s to see it on a printout then, in my view, the approach is a waste of a time-saving resource available to you in app.

1 Like

Yes, it’s for a permanent change and printout. You can already change the font colour in the document, so I don’t see why this feature isn’t already implemented. It’s not a new feature; it’s already been implemented in other software, even the free LibreOffice.

When I want to do something like this on a scale that doesn’t justify sync → LO → sync as it would take as much or more time than the below method, I go about it like this:

I have set a one-key shortcut for Find... / Next. (F3 in my case, under Windows.)
And I set a character attributes style for the word I want to stand out.

Once Find... has my word loaded, with my mouse over the C.A.S. in the styles’ panel, I use my shortcut for next, then click the C.A.S. in the styles’ panel. Repeat in loop 'til you’ve reached the end of the document. (Next, click, next, click, next, click.)

Sounds tedious. Why not just request this feature to be built in?

Asking for something in the future which may or may not happen, is different than making it so now.

I think I did (or someone else did) in the past.

iirc, the root system (QT) makes it very hard (or perhaps even impossible) for the app to select multiple instances of whatever at once in the editor.

As for having the app automatically apply attributes changes in bulk, I suppose it’d be more or less the same.

I’ve learned to live without it, I’m fine with things this way. What you “lose” here, the app amply makes up for elsewhere.

This said, you kind of already did ask for it to be considered. Whether the devs implement it in the future or not is up to them.

I thought version 3 was completely rewritten from scratch. It doesn’t make sense that developers would omit such a basic feature.

The appropriate method would be to apply a Style to the relevant words. Changing the Style changes all text to which it’s applied.

No, it was not.

Moreover, Mac Scrivener relies on Apple’s Mac OS text system. We’ve extended it a bit, but it’s still the core technology for basic text manipulation.

1 Like