Toggle for smart quotes

I’d love to put in a request for a preference toggle that, when enabled, automatically converts straight quotes (“these”) into smart/curly quotes (“these” and ‘these’). Many other plain-text editors include this and it would greatly enhance my work as a writer and editor. Thank you for a great product that I am enjoying learning and using.

Brian

19 Likes

Nice idea to borrow from other editors. If this is to be implemented, please consider support for different locales: German, French, Russian («» for external and „“ for internal).

3 Likes

Yes please. As a French writer I direly need this (I have set up a workaround with TextExpander, but still).
Same would go for typographic apostrophes, which are and not '. :slight_smile:

Thanks for clarification, indeed, other typographical adjustments would be nice to have too, e.g. … for three dots, – for two dashes, — for three dashes etc.

3 Likes

Yes, thanks for this! I came back to clarify, in part because I think the forum server to my post what I hope Obsidian will do eventually. I am asking for a toggle that turns all apostrophes (Unicode U+0027) into left and right single quotation marks (U+2018 and U+2019) and all quotation marks (U+0022) into left and right quotation marks (U+201C and U+201D). Thank you!

3 Likes

Hello,

If this is implemented, please consider implementing this in the preview, rather than in the editor. Smart quotes looks nice, but could cause issues with the “find and replace” / regex:

e.g.: find Tian's suggestion may not return a hit for Tian’s suggestion (former using “straight” quotes, latter using “smart quotes”).

Tian

Just coming back, seven months later, to ask whether anyone has figured this out. Plaintively crying out for a solution …

1 Like

I understand what you meant. I am no programmer but MS Word appears to be able to catch Tian’s suggestion even if you find Tian's suggestion. My web browser also have no difficulty doing it. I am not sure if it is difficult to implement this in Obsidian.

I would also love to have this smart quote features. Really want my notes to look nice.

1 Like

Agreed, I keep checking on this as well. This includes apostrophes. I really like Obsidian and want to jump in. I know it might come off like a weird, nit-picky thing, but I really want smart quotes to be on—I do not want to type them manually, and I do not want straight quotes. I am on macOS. If there were a way to make the Electron parts of Obsidian respect my System-level choice (or even via the edit menu) to always create smart quotes and never use straight ones, that would solve it.

For now, the only solution is to manually input them via commands (Option–[ for “ open; Shift–Option–[ for ” closed; Shift–Option–] for ’ apostrophe). Anyway, hopefully at some point!

I usually type these (I have them on the keyboard) but it’d still be nice if we got some setting for which characters should be “paired” for auto-quotes. (Like typing » and getting « as a closing quote, with the cursor in between.)

Caveat: Quotation marks, and especially the guillemets, are used differently in different countries!

For typesetting a book in Germany, we’d use »quote« and ›subquote‹, whereas French and Swiss writers would use « quote » and ‹ subquote › instead, and Russians «quote» and ‹subquote›. Finnish writers would use ”quote” (or »quote») and ’subquote’.

For French writers, it’d be great if the expansion could even contain the correct typographical space (U+202F), so if typing « in French one would get « | » (the | symbolising the cursor). But not for German, Russian, etc.

Also, in English, we’d use “quote” and ‘subquote’, in German „quote“ and ‚subquote‘.

Typographically correct quotation marks aren’t always easy. But always beautiful. :slight_smile:

So an (editable) “list of pairs” (including possible extra characters for languages like French) would be great. As an example, Ghostwriter has rudimentary support for this:
ghostwriter-matched-characters

2 Likes

Hey all, I’ve built a plugin that handles this: Smart Typography Plugin (curly quotes, em dashes, ellipses)

It’s basic at the moment, but I hope to expand it to support multiple language conventions

2 Likes

Thank you! I really appreciate it. As a non-coding writer, you’ve just made Obsidian something like 50% more useful to me. Sent you a “coffee.” Now I just have to unlearn option-[ and shift-option-[.

2 Likes

This is a fantastic solution until, hopefully, there’s something natively supported. Thanks so much for making this. :clap:

Thanks for this plugin: it’s just what I’ve been waiting for. I’ve implemented a kludgy, ad hoc search and replace script (a BBEdit ‘Text Factory’) to correct horrible typography in all my notes retrospectively, which I run first thing each morning, but having my text look nice as I type is far better.

Is there any chance you could include an option to demarcate italicised text with underscores rather than horrible asterisks? Or is that too far out of scope, as it’s an aesthetic issue, rather than a typographical one?

Very beautiful! Though I am a little late to join the party! I’ve been using alt+0146, alt+0147, alt+0151 and the likes. lol. Thanks!

1 Like

In mac there is a system setting for choosing auto‑pairing for quotations but Obsidian doesn’t support this setting specifically—although native mac text replacements are supported. I suspect that Obsidian doesn’t support native mac smart quotes due to the complexities introduced by smart em‑dashes. In theory they could offer mac‑users support for smart quotes and simultaneously disable feature for smart em‑dashes.

By offering smart quotes setting natively Obsidian would do a favor for authors—but the big question is why Obsidian would want to offer this kind of special care for authors who already uses others tools involving smart quotation. In a sense Obsidian is far from being an environment where authors prepare their documents. For example in LaTeX authors can use \say command offered by dirtytalk package to write quoted text.

The Smart Typography plugin, as mentioned, works great when I use my keyboard. But when I dictate using Dragon Naturally Speaking’s dictation box, the plugin fails to convert the quotes (which is understandable, as it pastes the dictated text into Obsidian). My solution is to use the Obsidian Linter plugin for that. Works like a charm–especially since I have assigned a button from my Stream Deck to Linter.