EmEditor (text editor) Forum Index
   EmEditor Core Enhancement Suggestions
     Smart Quotes
Register To Post

Threaded | Newest First Previous Topic | Next Topic | Bottom
Poster Thread
SteveH
Posted on: 10/9/2006 2:44 am
Just popping in
Joined: 10/9/2006
From:
Posts: 18
Smart Quotes
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.
Yutaka
Posted on: 10/9/2006 12:52 pm
Webmaster
Joined: 9/28/2006
From: Redmond
Posts: 2398
Re: Smart Quotes
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!


----------------
Yutaka Emura
Developer of EmEditor
http://www.emeditor.com/

SteveH
Posted on: 10/9/2006 11:59 pm
Just popping in
Joined: 10/9/2006
From:
Posts: 18
Re: Smart Quotes
Quote:
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'.
Yutaka
Posted on: 10/10/2006 7:26 am
Webmaster
Joined: 9/28/2006
From: Redmond
Posts: 2398
Re: Smart Quotes
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("‘(.*?)’","\x27\\1\x27",eeFindNext | eeFindReplaceCase | eeReplaceAll | eeFindReplaceRegExp);


I will submit these macros into the library.


----------------
Yutaka Emura
Developer of EmEditor
http://www.emeditor.com/

SteveH
Posted on: 10/10/2006 11:17 pm
Just popping in
Joined: 10/9/2006
From:
Posts: 18
Re: Smart Quotes
Very nice, thank you.
Threaded | Newest First Previous Topic | Next Topic | Top


Register To Post
 
English čeština Deutsch español français italiano 日本語 한국어 Русский 简体中文 繁體中文