CMD-N & default new subdocument type

Would it be possible to make CMD-N create a new subdocument based on whatever the default new subdocument type is for the container my current document is in? If I’m working in scrivenings mode, and the document which has my focus is a scene in a chapter folder, and the chapter folder has a default subdocument type of “scene”, I’d like CMD-N to create a new scene file. If my focus is in the text area of the Part folder, I’d like CMD-N to create a new chapter folder, as dictated by the Part folder’s default subdocument type.

focus in the technical term of “selected to be active” or in the “where my mouse is hovering”?

I’ve adopted the cmd-k habit when in a scrivenings to get new txt docs quick. Not sure if it will do the folder thing…

Not where the mouse is hovering; I don’t think anything in Scrivener operates that way. CMD-K won’t quite do it, because my document templates include some boiler-plate text in them; I’m actually modifying the Comic Script template to use 1 doc per panel, with each panel starting with “Panel <$n:panelNum>”, and each page gets a “Page <$t:comicPage><$rst_panelNum>, <$subDocCount> panels” I just was trying to keep the example simpler than that.

this is what happens with you order from BK (any one remember their slogan “got to have it your way”?) :stuck_out_tongue:

good luck. Seems like the type of thing KB would consider…

This should be working, if I understand what you are attempting to do. I set up a project with a “Chapter” document template which is a folder with a text file in it as a scene starter. The folder has this scene starter file selected as the default subdocument type, and in turn the Draft has the folder set as its default. So if I make something off of the draft, I get a chapter folder, and when I make something from a folder, I get a scene file. With these tests, in all cases I get the scene file:

  • Single-document selection in the editor of some subdocument within the chapter folder.
  • The chapter folder selected and in Scrivenings mode so that all scenes are visible. Pressing Cmd-N inserts a new scene file after the currently edited section of the Scrivenings session.
  • With a Multiple Selection of only some scenes within the chapter folder.

That is all of the conditions I could think of—is there something I missed that you are doing?

The only thing I know of that doesn’t work flawlessly—and this is just a known limitation—is when you create something with one of the chapter folder texts active in the Scrivenings session. You will get a new chapter folder, as per the Draft default subdocument type’s declaration, but it will be nested within the current chapter folder rather than inserted as a sibling following. Like I say, that’s just a known conflict between the expectation of a new thing being inserted after the current text item in the Scrivenings stack, vs. typical Binder behaviour.

Well would you look at that! It does work; I went through all that effort to ask for something that already does what I want. :blush: The Project-> (first menu item in the list) didn’t seem to be reflecting what I expected to happen if I hit CMD-N when I was writing up my request, but that could be down to user error.

This seems odd:

I create a panel document by hitting CMD-N, and left the name as “Comic Panel”.
Then I wrote some filler dialogue and hit CMD-N again.
The name of “Comic Panel” changed to the text in the first line of my document.

Is that supposed to happen? If I create a bunch of “Comic Panel” documents by hitting Enter with the focus in the Binder, and then go in and edit those files, it doesn’t happen; not even if I create new files with the keyboard shortcut.

I’m pretty sure that hinges off of the “Automatically name untitled text documents upon save” option in the General preference pane: for the purposes of default subdocument types, the original name of the document template is considered to be “untitled”. This behaviour only triggers if you update the content of the document without changing the title of it. So if you just create ten files in a row in the Binder they will all be “Untitled” or “Comic Panel” or whatever. But if you go in and type in something and then save, it will be automatically titled.

Ah-ha! When I write shorts, blogs, and even novels, I never leave a file or folder “untitled”, so I don’t think I’ve ever triggered that setting before. Thanks for setting me straight.