Subject: Suggestion for input helper feature [Print This Page] Author:
Xepol Time: 2006-9-19 20:55 Subject: Suggestion for input helper feature
Suggestion :
Use RegEx to check the current line and next line to decide whether to insert a template.
IE : when I press enter, and the line reads <symbol> := <symbol>.Create<anything>; and the next does NOT read TRY, insert :
Try
|
Finally
<first symbol>.Free;
End;
You can use RegEx expressions for this.
Also, another example, if I type IF and then space, and then hit space and nothing else is on the line, you could insert
(|) Then
Begin
End;
So a regex for text before the cursor postion that must match, and a regex for the text AFTER a cursor position that must either match or NOT match to insert text immediately at the cursor position.
This would make templates more intelligent about when they are inserted and make us all fight less with them when they appear.