CnPack Forum » CnWizards IDE Wizards » Suggestion for input helper feature


2006-9-19 20:55 Xepol
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.

页: [1]


Powered by Discuz! Archiver 5.0.0  © 2001-2006 Comsenz Inc.