Auto-apply style to a word

Hi,
I would like certain words (names of characters) in my text look like different so I can identify them quickly.
I’m looking for a way to automatically apply a style to each occurence of these words.
Could you help me please?
Thanks
Sylvain

Considering the significance of these words, to my mind they seem like the sort of thing you might want to jot down a note or two about them elsewhere. Certainly for characters, presuming this is a novel, that would apply—even if just to jot down a note to make sure the colour of their sweater doesn’t change throughout the day.

So with that in mind, you can think of Scrivener a bit like a wiki, where the text has hot links to important concepts scattered throughout it. The character name is one thing, but maybe their motivations are another, while the place in which they are having coffee is another significant detail you might want to jot down some thoughts on.

Here’s what I would suggest:

  • First, go into the applications main preferences/options window, and select the Corrections tab along the top. Enable the Automatically detect [[document links]] setting.

  • Optional: you probably don’t want to bat away windows that pop up or splits that open, every time you do this, you just want to continue writing. So my recommendation for this way of working would be to click on the Behaviors tab, and under Document Links in the left sidebar, change Open new document links in to “(Do not open)”.

  • Optional: next is the appearance of links. You’ll find various settings pertaining to that in the Appearance: Textual Marks section, in both Options and Colors tabs.

    While you are there, note the “Hide Markup” section. This may come in handy for you. It is a feature you can toggle on and off in the main editor, that hides various markings like this for a cleaner proofing environment. You might want to add links to that list.

All right, so with the setup out of the way, in practice what you’ll do is type in “[[character’s name]]” just like that in the editor. The first time you do that a window will appear asking what to call the linked section, and where to put it. After that point, Scrivener will detect it already exists and just remove the brackets for you and link the word(s). It’s a few extra keystrokes, but it quickly becomes a habit in my experience.

You may at some times want to link to a topical section like this using something other than its name in the binder. For that, instead of using the bracket method, just select the text that should be linked, and do this:

  1. Hit the shortcut for Quick Search: Mac ⌃⌥G / Win Ctrl+Win+G
  2. Type in a little of the name, enough to find it in the list.
  3. Drag the search result out of the list and onto the selected text.

This also, in my experience, quickly becomes a habit. I use both of these methods a lot in my writing.

You may also want to go back and review the link settings in Behaviors: Document Links to better suit how you find yourself using this. For myself I like having clicked internal links like this go to the Copyholder. Copyholders are nice because they stay fixed to the editor even as you navigate around to other parts of the work, and they don’t get in the way of regular split views. The other nice thing about them is that the icon in their header bar can be dragged onto selected text to make a link to it—thus skipping the Quick Search step. I use this to pin topics I’m writing about, or going back through existing text and linking up. Sometimes that ability is the only reason I have a Copyholder open at all. You may even want new links to open in a Copyholder instead of doing nothing.

It’s not automatic, sure, but that is unlikely to happen given how the text editor is designed. As a rich text editor, applying formatting to text on the fly is a lot more difficult than in something like a Markdown editor. Besides, in my opinion using a link to gain that different look is all around a better tool for stuff like this, because you get that ability to annotate these topics. You may not even use it for everything—that’s okay. Empty items in the binder don’t hurt anything, and they are there if you ever do want to drop in a note.