[TxMt] Re: Autocomplete word

Allan Odgaard mailinglist at textmate.org
Tue Nov 24 12:19:12 UTC 2009


On 22 Nov 2009, at 14:07, Alain Matthes wrote:

> The  text boxes in Textmate are not Cocoa however,   why F5 and not  
> F6 or another key in the Text Bundle?

Not entirely sure what you are asking here.

The Cocoa text system had a ‘complete:’ method since 10.0 but it was a  
no-op. There was a TextExtras input manager which implemented  
completion behavior a la what you currently have in TextMate. It came  
with a key bindings dictionary that bound ‘complete:’ to escape.

When I wrote TextMate I simply copied the behavior of this  
implementation, also using the ‘complete:’ method and additionally  
also copied the key binding.

Later Apple implemented ‘complete:’ for their text views (with a  
different behavior) and bound ‘complete:’ to F5.

We could remove the default binding on ‘escape’ and then also remove  
the default bindings of F5 — but I haven’t felt compelled to do that,  
as a lot of users would then have to learn new keys for (presumed)  
often used functionality (including me, and I find F5 quite awkward  
for completion as I can’t hit it w/o looking at the keyboard).





More information about the textmate mailing list