Text variables, integrated to keywords

One thing that happens when working on a project is that at first you don’t know the names of characters or places. So at first you might put in placeholders (“Mother”, “Detective”), later you might replace those with names (“Jane”, “Robert”), then these names might be edited a few times as their characters flesh out along with their actions, and their proper name will be revealed to you.

This happens with all sorts of things.

It would be great if you could define keywords and drop them in to text in various places. They just appear as regular text, but the cool thing is, if you change the text in the keyword panel, it automatically updates that text throughout the document. It does that updating currently for things you’ve tagged, but not for text you’ve dropped in.

Similarly it would be great to be able to create a keyword hierarchy from an existing document or folder hierarchy - also where names change if either the docs/folders or keywords are changed. Why would you do this? Because often in Scrivener’s use, you end up duplicating things in keywords that already exist in a more robust form (with supporting notes, images, etc.) in folders and text blocks. Being able to sync these and use the robust form in outline form as keywords, that automatically update, would keep you from having to recreate these structures. This is great for characters, locations, etc.

Thanks for listening!

That would be so uber-mega-super-cool!
I’m the kind of person that constantly changes characters names, so I spend more time in the replace panel than anywhere else.
I would greatly benefit from user-definable variables.

I’m afraid that keywords that update the text live wouldn’t be a great way of doing this in practise, as cool as the idea is. It would mean that every time you edited a keyword, Scrivener would have to scan through potentially hundreds of documents looking for the old word and replacing it with the new, clearing the undo stack as it went.
Thanks for the suggestion, though!
All the best,

To be honest, Project Replace will do what you’re asking for 9/10 anyway. If you’re placeholding with ‘Mother’ or ‘Simms Mcgee’, then finding and replacing those isn’t much of a problem. I’d agree with you if we had no global Project Replace, but hey. All hail global find & replace!

(consequently it’s my biggest gripe against Coda)

I suggested something similar in the Wish List section some months ago, adding a feature that approximated the use of variables as implemented in the Mellel word-processing program. Ideally, still think something like this would be cool – though I recognize the technical problems.

When sketching out ideas and notes, especially in the background stage I often find myself guilty of either accidentally or intentionally making minor variations in the names of people, places, or things as my thoughts develop. So, simply using Project Replace doesn’t always work for me, since I don’t always remember the precise string with which I’ve named something! I still think a list of definable variables would help with this sort of thing, but I may be a voice alone in the wilderness on that … :slight_smile:

I think there’s another way to implement this besides scanning all the documents. It’s late here so no time to delve in, but I’ll do some research and see what I can come up with.
Obviously if you decide not to that’s still your call. But if the reason is truly technical I have a vague memory of something that would do the trick.

Thank you,

Sorry if I use again this tread.

What if the keyword is replaced only when you compile the project? In the editor you always see the keyword, but when you compile the keyword is replaced by the word (or words) assigned to it.

This function could be very useful for a lot of things, like character’s name or location. For example I’d use keywords for dialog delimitations. In Italian books a dialog can use different types of simbols for opening and closing a spoken text:

  • «bla bla bla»
  • -bla bla bla- (but if the closing - is at the end of a paraghaph it is omitted)
  • “bla bla bla”

and so on.

I’d like to use a keyword symbol for opening and closing and then set the correct symbol when I compile the document. Find&Replace isn’t good for this purpose.

Now I’m using something like \z and \x and then I use find&replace whit a word processor after the compile, but I thik it could be a good function for Scrivener.