Hello,
I’ve been using Scrivener for the past 2 days and so far I am enjoying myself. I’m currently writing some Software Development articles and I am looking for some features that may exist but I do not know about them yet. I’ve skimmed through the manual but no luck with what I am looking for.
I am aware that I can create a new Text from a Template and I know how to create them. But I am looking for creating a Template for use within the Text itself. Sort of like a “Notes Section” template or an “Exercises Section” that are then embedded in the Text.
There are two tools for this, I would say, each having an advantage depending on whether you are looking at the snippet itself, and wish to apply it elsewhere, or vice versa.
The Edit ▸ Append Selection to Document command is what will work best for the former. Select the text of the snippet template, and then indicate which item to add the text to. This command keeps you in the original document, so it’s useful if you want to spam this text into a few different places.
For inserting the contents of another document into the one you’re working on, just drag it from the binder and drop it into the editor, where its text should be inserted. (Note for future reference: in v3 you will need to hold down the Alt key while doing this, otherwise it will insert a link to the document.)
Are the only quick methods for inserting the text of a template into another document still those described in Text Template - #2 by AmberV ?
I don’t think (1) will fit the workflow I thinking of. Ideally, I would like to insert the text at the current position in the editor, not just append it to a document.
(2) sort of works. However, when I drag and drop while pressing Option on Mac, the text is properly inserted in the target document, but the template document still gets selected in the Binder, and the editor switches to it instead of the document where the text is inserted.
Am I doing something wrong in (2), or is this a bug on Mac? ( I started a new topic here in case it was a bug, since the other thread was under Windows.)
Are there any other efficient ways of doing this that I missed?
Try using Quick Search to select the target text you want to insert, instead of going to the binder. You can type in a little of the name (and if this in fact a template you can optimise the name for efficient searching), and then drag and drop from the search result list.
Otherwise, bear in mind the little note in the user manual, in §6.3.4, Moving and Copying Things Around, under the section, “By the icon”. Almost anywhere you see the item represented with an icon (like the quick search results), acts as a proxy for dragging that item from the binder.
Here are a few examples of a more persistent place you can “store” the icon for quick application, if you’re doing this over and over:
Project Bookmarks (there is a floating list for them if you want, or they can be found in the inspector sidebar).
Thanks for all of the suggestions. I learned a lot of new things.
I also just figured out that there is a difference in behavior when dragging from the binder depending on when i press Option:
If I hold Option while selecting the document in the binder, and then hold it while dragging, the editor will navigate to the selected document after inserting the text in the target document.
However, if I select a document in the Binder without pressing Option, then start the drag, then press Option while dragging, the text is inserted correctly in the target document, but no navigation occurs.
Is difference in behavior intended?
I think the behavior in (2) is sufficient for my workflow. Though I wouldn’t object if there were ever a way to do it without dragging from somewhere either.
Another method would be project bookmarks. Depending on the amount of text you can create one document containing all the snippets and add to your project bookmark list and even move to the top of the list. In any document click on this project bookmark and the text is displayed in the Inspector note section and it becomes easy to copy the text from there and paste inside the current document. By being in project bookmarks you have access to this from any file in your current project.