[TextMate] re: Heuristic for smart typing pairs

Chris Jenkins chrisjenkins at mac.com
Wed Oct 20 18:33:01 UTC 2004

Heres another idea which Im pretty sure would satisfy my original 
comment. Currently TM inserts the closing character of the pair at the 
same point as the user types the opening character, if on the other 
hand it waits for one more key press before deciding whether to insert 
the closing part of the pair, it could perhaps make a better guess as 
to whether that is what the user wants. For example; moving the cursor 
could be construed as a cancelling operation, so the closing character 
would be omitted if the user simply pops back to add a quote character 
to the start of a word and then clicks somewhere else in the document 
(or uses the arrow keys), whereas simply continuing to type after 
pressing the opening character would be construed as a confirmation and 
the closing character inserted as it is now.

so what im saying is: wait to see what the user types next, and then 
decide whether to insert the closing part of the pair.

does that make sense?


More information about the textmate mailing list