Autoreplace, Templates and Projects

Hi, using TPL files is a nice feature. But one problem is, that after replacing the cursor stucks at the beginning of the replaced text. When I use "direct replacements", the cursor moves to the end (behind the replaced text). What can I do, that after replacing the cursor moves to the end of the replaced text?

Example 1:
s*=SELECT * FROM

Result:
"s*" is replace with "SELECT * FROM" and cursor is moved at the end of the replaced text (FROM => cursor).

Example 2:
s*=AutoReplace\select_star_from.tpl
Content of file:
SELECT *
FROM

Result:
"s*" is relaced correctly with
"SELECT *
FROM", but cursor stucks in front of the "SELECT". I have to move cursor manually to the end before I can go on typing.

Thanks
Thorsten
 
For templates you can control exactly where the cursor should be located by using the [#] directive. For example, if you have a template like this:

Code:
select *
  from [#]

the cursor will be located at the end. Similarly:

Code:
select [#]
  from

will place the cursor after "select" and before "where".
 
Back
Top