Posted By: matejj Auto replace with cusor positioning - 03/22/22 07:27 AM
I have a feature request:

After auto replace I would like to position cursor to specific position.
For example:
td*= to_date('','dd.mm.yyyy')
and cursor is on the end of new text, but I would like to positon cursor: to_date('here','dd.mm.yyyy')

I don't think this is possible with current functionality?
Posted By: Marco Kalter Re: Auto replace with cusor positioning - 03/22/22 10:00 AM
It is possible when referring to a template in the AutoReplace text. For example, if you have a template folder "SQL Functions" with a template "to_date.tpl" with the following contents:

to_date('[#]','dd.mm.yyyy')

The [#] indicates where the cursor should be.

In the AutoReplace text you can now refer to the template:

td=SQL Functions\to_date.tpl

When typing "td" the template text will now be inserted and the cursor will be located at the position of the [#]. The [#] will of course not be inserted.
Posted By: matejj Re: Auto replace with cusor positioning - 03/23/22 01:26 PM
Thank you. It works great!
© Allround Automations forums