[TxMt] Re: Autocomplete word

Hans-Jörg Bibiko bibiko at eva.mpg.de
Sun Nov 22 14:15:19 UTC 2009

On 22.11.2009, at 14:07, Alain Matthes wrote:
> 2) I suppose there is a technical problem to implement the F5 functionality but  F5 is very interesting with TextEdit or Page because  the completion with the dictionnary is fine and the language is auto detected,  ⎋  and  ⌥ ⎋  are fine  ( ⌥ ⎋ has always  a bug with LaTeX ) but is it  possible in TextMate to implement the F5 functionality? 

There's an "hack". You can download my TMTOOLS plug-in here:

double-click on it to install it.

Then save the attached tmcommand "Complete" which is bound to F5, and double-click at it to install.

The tmcommand:
Input: none
Output: discard
"$TMTOOLS" complete usingDictionary '{lang="`"$TMTOOLS" get currentSpellCheckerLanguage`";showInternalListFirst=yes;}'

Set TM's spelling language to whatever language eg. French.
Then type in a doc eg "Étu" and press F5 for Complete (maybe you have to rebind the "Sort" commands) and type further "dien" and press RETURN and enjoy.

You can also write "Étu", press F5 for Complete, press BACKSPACE and type further ie to complete to "Étienne".

The command cannot auto-detect the spelling language. It takes that language set in the spelling pane.
It also cannot toogle upper/lower case letters of that word part typed before you invoked Complete.

In other words it can do 98% of the Cocoa completion BUT it can something which Cocoa does not can do, press BACKSPACE :)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Complete.tmCommand
Type: application/octet-stream
Size: 728 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20091122/a75c8dbd/attachment.tmCommand>
-------------- next part --------------


PS Please read the Important Note before installing.

More information about the textmate mailing list