Print Thread
Autoreplace
#42631 11/04/11 12:59 PM
Joined: Nov 2011
Posts: 28
Netherlands
E
EvROCS Offline OP
Member
OP Offline
Member
E
Joined: Nov 2011
Posts: 28
Netherlands
(Version: 9.0.2.1621)
I love the autoreplace function.

I prefer using it with 'special characters' (like * and ^) for two reasons:
1. to make sure an alias is only autoreplaced if it's followed by this character
for example: "for*" will be replaced by a for-loop construction, but "for" will not.
2. to make a distinction between different types of replacement text.
for example:
typing tablealias abc* will be replaced by "select abc.* from my_abc_table abc;"
typing tablealias abc^ will be replaced by "my_abc_table abc"

Now I find that only a few special characters work with autoreplace.
So far only * and ^ seem to work.
If for example I have an entry
cnt_ = select count(*) from

The string cnt_ does not get replaced. If I change the underscore into an asterisk or a carrot it does.

Am I doing something wrong?

Furthermore:
Following advise in another thread, I have also tried turning of autoreplace in the preferences, and assigning a shortcut-key to "Editor: Autoreplace".
For me, this would be a very acceptable way to handle reason 1. (In fact I would love to use it this way)
However,
In the program-window that was open when I went to preferences all works as expected: no automatic autoreplace, hitting the shortcut key initiates a replace.
But when I close that program window and open a new one, still no automatic autoreplace (as expected) but no reaction to the shortcut key either. All other customized key's work perfectly.
Does anyone know why?

Erik van Roon


Erik van Roon
EvROCS

Re: Autoreplace
EvROCS #42635 11/05/11 10:47 AM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
We'll check out both issues and will try to improve things.


Marco Kalter
Allround Automations
Re: Autoreplace
Marco Kalter #42642 11/07/11 10:31 AM
Joined: Nov 2011
Posts: 28
Netherlands
E
EvROCS Offline OP
Member
OP Offline
Member
E
Joined: Nov 2011
Posts: 28
Netherlands
Thanks for the reply, Marco.

Do I understand correctly that my issues are not due to my own stupidity, and that you where able to reproduce them?


Erik van Roon
EvROCS

Re: Autoreplace
EvROCS #42644 11/07/11 10:54 AM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
We have not yet been able to reproduce this. All seems to work fine. We're still looking into this though.


Marco Kalter
Allround Automations
Re: Autoreplace
Marco Kalter #42646 11/07/11 11:30 AM
Joined: Nov 2011
Posts: 28
Netherlands
E
EvROCS Offline OP
Member
OP Offline
Member
E
Joined: Nov 2011
Posts: 28
Netherlands
Would it help if I send you my autoreplace.txt?
I mean, if you can't reproduce it, it implies that there might be something wrong on my end.


Erik van Roon
EvROCS

Re: Autoreplace
EvROCS #42647 11/07/11 11:53 AM
Joined: Nov 2011
Posts: 28
Netherlands
E
EvROCS Offline OP
Member
OP Offline
Member
E
Joined: Nov 2011
Posts: 28
Netherlands
Problem partially solved

The issue with autoreplace only accepting * and ^ as special characters was due to my stupidity.
My autoreplace.txt had entries like "alias* = replacement text".
Removing the whitespace on both sides of the equal sign makes plsql developer accept other characters then just * and ^.
My bad! The examples in the manual clearly show no whitespace on either side of the equal sign.
Still, weird that when whitespace is included, it does work with * and ^. But that's not a bug.

The other problem, with the shortcut key for autoreplace, still exists.


Erik van Roon
EvROCS

Re: Autoreplace
EvROCS #42648 11/07/11 12:11 PM
Joined: Nov 2011
Posts: 28
Netherlands
E
EvROCS Offline OP
Member
OP Offline
Member
E
Joined: Nov 2011
Posts: 28
Netherlands
About the second issue (shortcut key not working):

As long as "Tools - Preferences - User interface - Editor - Autoreplace - Enabled" is checked the key for autoreplace (CTRL-\) works flawlessly.
When I uncheck the mentioned checkbox, CTRL-\ still performs a replace in all allready open program windows, but NOT in any new program window


Erik van Roon
EvROCS

Re: Autoreplace
EvROCS #42656 11/08/11 10:49 AM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
I can indeed reproduce the 2nd issue. We'll fix it.


Marco Kalter
Allround Automations
Re: Autoreplace
Marco Kalter #42689 11/10/11 04:40 PM
Joined: Nov 2011
Posts: 28
Netherlands
E
EvROCS Offline OP
Member
OP Offline
Member
E
Joined: Nov 2011
Posts: 28
Netherlands
Great! Thanks!


Erik van Roon
EvROCS


Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.042s Queries: 14 (0.013s) Memory: 2.5378 MB (Peak: 3.0427 MB) Data Comp: Off Server Time: 2024-05-18 17:26:04 UTC
Valid HTML 5 and Valid CSS