EmEditor (text editor) Forum Index
   EmEditor Core Bug Reports
     Ctrl+F3 non-intuitive work
Register To Post

Threaded | Newest First Previous Topic | Next Topic | Bottom
Poster Thread
Flint
Posted on: 7/6/2010 7:06 am
Home away from home
Joined: 10/9/2006
From: Moscow
Posts: 156
Ctrl+F3 non-intuitive work
1. Open the Find dialog, tick the "Regular Expressions" checkbox, close the dialog.
2. Select any text that contains characters that play special role in regular expressions (for example, perl variables look like $something), press Ctrl+F3.
3. The selected text will be treated as a regular expression, not as text itself, and therefore even the selected text will not be found.

I think, in such situation EmEditor should just internally escape all the meta-characters that happened to be present in the selected block.
Yutaka
Posted on: 7/6/2010 9:20 am
Webmaster
Joined: 9/28/2006
From: Redmond
Posts: 2404
Re: Ctrl+F3 non-intuitive work
Hello Flint,

Thanks for your comments. Some people don't want to change the text at all, so this needs to be optional. I might think about that in future versions.


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

Flint
Posted on: 7/6/2010 10:40 am
Home away from home
Joined: 10/9/2006
From: Moscow
Posts: 156
Re: Ctrl+F3 non-intuitive work
Well, an option would be helpful, but I'd prefer the following implementation:
a) if user presses Ctrl+F3/Ctrl+Shift+F3, then EmEditor search the selected text exactly what it is, i.e. escape if necessary, no matter what options are set;
b) if user presses Ctrl+F to open the Find dialog, then the text automatically inserted there either as is, or escaped - that's where the option comes in.

It's extremely hard for me to believe that there is at least one user who deliberately selects some text inside the file being edited, and presses Ctrl+F3 not to search for other occurences of exactly the same text he/she selected, but to use the selected block as a regular expression for immediate searching. What a file should that be that it contains both real text and regular expressions for searching this text, at the same time?

That's exactly why I used the word "internally" when talking about escaping. How the text appears in the Find dialog is one thing - and I completely agree that automatic escaping here should be optional. But internal implementation is not restricted by this rule, because user does not see what is being done, he/she just sees the final result, so it does not matter if the text was escaped inside EE or not.
zhouzh2
Posted on: 6/29/2011 8:23 pm
Just can't stay away
Joined: 7/27/2008
From:
Posts: 89
Re: Ctrl+F3 non-intuitive work
+1 for Flint's proposal.
There is no need to "internally" escape the selected text.
1. when no text selected, Ctrl+F3 finds the next exact word at cursor, so turn off regex and escape sequence, turn on search only word.
2. if text selected, Ctrl+F3 finds the selection, just turn off regex and escape sequence.
3. Ctrl+F will always use the word at cursor or the selected text, with options unchanged. Ctrl+F in 10.0.8 works just fine.
IMHO the current implementation of Ctrl+F3 is not "wrong", but not "smart" enough
Yutaka
Posted on: 7/14/2011 12:42 pm
Webmaster
Joined: 9/28/2006
From: Redmond
Posts: 2404
Re: Ctrl+F3 non-intuitive work
I will add a little smart way in the future version.
Thanks!


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

Threaded | Newest First Previous Topic | Next Topic | Top


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