CnPack Forum


 
Subject: Suggestion for input helper feature
Xepol
新警察
Rank: 1



UID 2598
Digest Posts 0
Credits 1
Posts 1
点点分 1
Reading Access 10
Registered 2006-9-19
Status Offline
Post at 2006-9-19 20:55  Profile | Blog | P.M. 
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.
Top
 




All times are GMT++8, the time now is 2024-12-4 16:42

    本论坛支付平台由支付宝提供
携手打造安全诚信的交易社区 Powered by Discuz! 5.0.0  © 2001-2006 Comsenz Inc.
Processed in 0.007976 second(s), 7 queries , Gzip enabled

Clear Cookies - Contact Us - CnPack Website - Archiver - WAP