Smart Quotes

Started by: SteveH2 voices5 posts

I thought I would copy a couple of my previous posts over as they were added to the old forum just as it was moved.

Although I used to loathe smart quotes in Word, I have come to like them when creating text documents in applications such as BBEdit. I would find it useful to have an option to create ‘smart quotes’ automatically when typing. Obviously this is no use when writing code so it would need to be an option applicable to specific configurations.

In addition menu options to educate quotes or stupefy quotes would also be occasionally useful.
Thanks for following up your message. It is not hard for someone to create a plug-in to do smart quotes. Can you please clarify what educate quotes or stupefy quotes mean. Thanks!
Can you please clarify what educate quotes or stupefy quotes mean.
Educate quotes would convert selected text such that 'this' becomes ‘this’. Selecting text and then stupefy quotes would convert ‘this’ to 'this'.
Actually, You can do those now:

Select "Replace" on the Search menu (or press CTRL + H), Check "Use Regular Expressions", and then:

Eduate Quotes:

Find: '(.*?)'
Replace with: ‘1’


Stupefy Quotes:

Find:‘(.*?)’
Replace with: '1'


Or you can write macros like these (JavaScript):

Eduate Quotes:


document.selection.Replace("x27(.*?)x27","‘1’",eeFindNext | eeFindReplaceCase | eeReplaceAll | eeFindReplaceRegExp);


Stupefy Quotes:


document.selection.Replace("‘(.*?)’","x271x27",eeFindNext | eeFindReplaceCase | eeReplaceAll | eeFindReplaceRegExp);


I will submit these macros into the library.

Very nice, thank you.

5 posts in this topic