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

16 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).

2 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.

2 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!

2 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

1 Like

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.

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

1 Like

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

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-[.

1 Like