Sublime Forum

How to turn straight to smart quotes?

#1

Hi all, I am trying to make my collaborative work smooth but ST3 makes my life a bit more difficult as it refuses to do smart single and double quotes, giving only the straight ones. I would need those for both the plain txt and md.

There were some similar questions posted here (e.g., here, and here), but mainly to do the other way around and answers are not really given at all.

Can anyone help with this? Thanks!

0 Likes

#2

Anyone? Anything?

0 Likes

#3

Can you describe a workflow in which you’d like the quotes to be inserted? Should they be inserted when you insert " with your keyboard or do you want to post-process?

For post-processing, replace "(.*?)" with “\1” in the replace panel.

1 Like

#4

Thanks for replying! I am, for example, creating a makrdown document or a plain txt. I would like to, as you said, get smart quotes as soon as I insert " or ', not in post-processing.

0 Likes

#5

I know this package for Latex text. May be you can adapt it for your usage.

1 Like

#6

It does not work for non-LaTeX documents as it seems. But I really wonder why my general keyboard setup that should turn straight into smart quotes (in System Preferences -> Keyboard -> Text -> Use smart quotes and dashes) does not work in Sublime Text 3.

0 Likes

#7

If I had to guess, Sublime opts out of that setting because as a general purpose text editor and programming tool, you would have to keep swapping the settings if you were working on say a C program, for example.

0 Likes