Toad World® Forums

Auto replace not working as it used to?


#1

For example…

I have an auto replace set up that expands ‘con’ into ‘concatenated_segments’.

In Toad 12.5.1 typing this: msi.con followed by a space would magically change to msi.concatenated_segments.

In the 12.8.0.5 Beta it just stays as msi.con

Please can you make the auto replace work the way it used to?


#2

I seem to remember there being a similar issue with this in Toad 9.5 but I think that was when the auto replace contained a full stop. So if your auto replace was .con you would be able to type msi.con and it would expand to msi.concatenated_segments. The answer then was that the full stop was a special character and could no longer be used in that way so the workaround was to change the auto replaces to remove the full stops and the end result would be the same.

I expect the reason for it not working now is because it is treating the entire string msi.con as one entity rather than the 3 that it used to. Apparently this is for lexing purposes - I raised it in a previous post on this forum regarding auto replace where I mentioned that while ROWID is highlighted if I don’t use a table alias, as soon as I do (i.e. a.ROWID) the highlighting is gone. As it was just a highlighting issue, I didn’t think it was much of a problem but maybe it is causing other problems too and is worth revisiting?


#3

The auto replace and highlighting issue are unrelated. I’ve logged the auto replace bug to be fixed for 12.8.

Thanks,

Michael


#4

Auto replace bug fixed for next beta.


#5

Just updated to 12.8.0.9 beta.

msi.con now expands to ‘msi.concatenated_segments’ which is good. However…

s* is no longer expanding to ‘select * from’ like it did before

s*f is no longer expanding to ‘select * from fnd_user’ like it did before


#6

Actually, s* does get auto-replaced - but only if it’s on the first line in the editor window!


#7

Ok, I think I have auto replace fixed now for 12.8.0.11.

In addition to the issues noted, one auto replace string can be a substring of another and this also is not handled properly. Toad 12.6 and earlier appear to scan from line start to the caret position searching for the longest auto replace triggering string. 12.7/12.8 is back scanning from the caret position looking for the shortest string. 12.8.0.11 will scan from line start as in prior versions.


#8

Thank you - it seems to be working just fine now in 12.8.0.11