Document search

I find the document search (and indeed the project search) a little hinky at times, as my posts asking for help, always kindly received and much helped - thanks! - will show. So maybe it would be possible to take a look at how this works generally; why does sending the cursor to the top of a document make a search possible when it’s not working otherwise, and is it possible to improve the search using this.

But apart from that, I’ve another request. When you do a search-and-replace, would it be possible for the ‘Replace’ field to be highlighted or empty when you tab into it?

At the moment, it contains the last ‘Replace’ choice you made.

I’m constantly looking for things like double spaces and replacing them with single spaces, in the course of editing students’ work - older students are convinced that you should put three spaces after a full stop and two after a colon or semi-colon, as typing teachers taught back in the day.

But I’m also constantly looking for “. and “, - to correct them to .” and ,” in dialogue.

At the moment, when I search for “space-space” and want to replace it with “space”, when I tab down to the “Replace” field it often has “comma-quote” in it, and I have to backspace three times - twice to get rid of what’s there, once to be sure.

If the field were highlighted or empty, I could just hit the space bar once and then click “Find and Replace All”. Twould be very handy.

That’s the way most applications work. Your last search/replace terms are retained for reuse.

As reepicheep says, having the old replacement there is standard behaviour, and removing would often be annoying.

As for the other problem, though, that is a bug in the current version of Scrivener that will be fixed for the next update. Just to check, though - does this problem (Find not cycling back to the start of the document) only occur when you have the comments pane open and when there are no comments? As far as I know, that is the trigger of the bug.

Thanks and all the best,
Keith

To test this, I just opened a document in Word for Mac, did a search-and-replace, then opened a different document and invoked search-and-replace again. The search-and-replace dialogue came up empty, and didn’t have the last search term in either the Find field or the Replace field.

Word for Mac is the only other word processor I use regularly. In other ways, its search can be annoying: the “search-and-replace” box doesn’t appear as the norm when you press cmd-f; instead you have to press cmd-shft-h, and when you do that, a panel appears on the left, with the cursor in the replace box! Maddening!

I tested this too using LibreOffice and Apple’s Pages. The first retains the Find term between invocations and provides a pull-down list of previous replacements. The second retains both Find and Replace terms between successive invocations. LibreOffice has pending delete set on the Find term when this Find-Replace dialogue box is displayed. Similarly Apple Pages has pending delete set on the Find term when their dialogue is shown and tabbing from Find to Replace and the Replace term gets pending delete set. The same behaviours happen when opening a second document with LibreOffice and Pages.

I think that as Mac OS X is Apple’s product they are the ones who decide how Find/Replace should behave on their systems.

Scrivener is the only tool I use to write these days. I compile the project to Word docx format when I have to and leave the recipient to deal with the vagaries and bizarrenesses of Word.

Have you tried Format > Convert > Multiple Spaces to Space? You shouldn’t need to use Find and Replace to deal with the multiple spaces in your students’ work. If you’re having to do it all the time, you could even set up a shortcut through the usual system in the preferences.

:slight_smile:

Mr X

Thanks, Mr X - I’d love to write a macro to do a bunch of things like this, but it’s a bit too complicated for my simple, primitive skills! Actually, I do use Devon’s Word Service for some; maybe it tackles multiple spaces.

If most of your editions are of a similar kind as those you mention you may want to try the compile time replacement function. It may well solve all of them automatically.

Just my 2 cents.

Ctrl+Space will convert multiple spaces to a single one.

Ctrl-Space is a Windows binding, there isn’t one set by default on the Mac. But on that note, just to be clear, Mr. X was referring to a menu command, you don’t have to learn how to make macros. :slight_smile: It is in the main Format menu, within the Convert submenu, roughly in the middle.

What’s the compile time replacement function, please?

Really? Okay, I guess I must’ve set that up then. Probably the first thing I did in MacScriv, as I use it a LOT.

You may want to read section 24.18 Replacements of the manual for MacScriv. Here’s an excerpt: