I would like to type three hyphens at the top of my documents, to start a Yaml block. But the second hyphen automatically morphs into an em dash, then I type again, and again, but no luck. I have not ticked the box “Punctuation → Use smart dashes”. All 4 options in Auto correction are also off. Thanks.
This is probably coming from Mac OS. Check the Apple → System Settings → Keyboard → Input Sources pane.
One workaround is to hit ⌘Z (command-Z) immediately after the system auto-substitutes with the em dash. It should undo the auto-substitution and revert to the single hyphens.
Thank you both.
In the Input Sources pane, the smart quotes and dashes is off.
Fortunately, the Command-Z hack reverts the dash to three hyphens. Great tip, Cavalierex!
Although I can’t explain why it works the way it does, the checkboxes under (Scrivener Menu) → Edit → Substitutions overwrite Scrivener’s and macOS’s settings, so make sure to uncheck “Smart Dashes and Ellipses” there, too:
Thanks November_Sierra. I hadn’t discovered that one. You’re right, it was checked. Makes my life just a little bit easier
Looks like this is a per-project toggle (the Scrivener settings mention “in new projects”, so that’s more of a default, I guess).
Yes, this is one frustrating thing in Scrivener… several things in Scrivener are “for the future only”, and you can’t propagate changes across all documents that were already created. I think it has to do with the amount of metadata stored in the .scriv package across various files. I’m sure some things were just too tricky to code. (Maybe the New App will have some structural/technological advantages that will make this better.)
As a project default it might possibly have been better placed in the Project → Project Settings. It’s probably one of the headaches for Keith deciding where to put all those options and menu-items so that we can find them without reading the manual.
I see what you mean, but that’s likely not the reason. Rather the possibility of changing too much in other projects without even noticing it.
But there are no project settings before you create a project. So in a sense that’s what already happens.
The setting in the main preferences/settings affects all new projects when they are created, whereas adjusting options in Project ▸ Project Settings only impacts that specific project after it exists. So it wouldn’t really be possible to put this option there.
The new project options in the main Settings are meant as the “usual” case for you, but oftentimes users have certain projects that need to be different from the norm, and that’s where the toggle for the substitutions, spelling, etc. comes in, allowing you to turn off or on the setting for that particular project for as long as you want, while still creating your new projects with the default.
If you use Yaml blocks regularly you can save time if you chose a keyboard combination that is easy to type and creates a glyph you never use and have that glyph replaced by ---
in macOS’ text replacement settings.
For example, opt-hyphen
or opt-y
, depending of your language of course.
If you used more advanced tools like Typinator you could use this method to insert two triple hyphens (and two paragraph breaks) and have the cursor put in between.
Maybe not that one, it’s an en-dash by default (“–”).
Like I said, that depends on the language. On German keyboards it is an en-dash, indeed.
Hmm. “Use smart dashes in new projects” was always unchecked in my app. But it was checked in the Edit → Substitutions channel until November_Sierra alerted me to it. I just now made a new project, and having unchecked the option via the Edit menu in my current project, it is now off in the new one.
Anyway, I think I just expected to find defaults for the current project under Project → Project Settings, irrespective of new or existing project, because I assume that menu options effect the active file in the window.
True, on the other hand it’s way easier to assign a keyboard shortcut to menu items.
Thanks. Yes, I use Alfred, just hadn’t set up a snippet yet. But I’m not sure if Substitutions would leave the input be if the option for Smart Dashes had been enabled in the Edit menu.
That works regardless, since the substitutions just substitute your typing. (Yes, I just tried it.)
Yes, that makes sense.