[TxMt] Re: Cocoa Autocomplete

Adam R. Maxwell amaxwell at mac.com
Thu Jan 11 15:02:08 UTC 2007


On Jan 11, 2007, at 05:43, Sam Halliday wrote:
> But then also merge this "master" dictionary with the user file. One  
> of the main reasons for me switching to TextMate over Emacs was to  
> get the Cocoa spell checker. I'm not overly keen on using another  
> word source.

[...]

> If, however, there was a way to interface with the Cocoa  
> "complete:", then it would solve these problems. Perhaps there may  
> be a way of doing this using an AppleScript.

I think you could write a Foundation command-line tool that calls  
[[NSSpellChecker sharedSpellChecker]  
completionsForPartialWordRange:inString:language:inSpellDocumentWithTag 
:] and provides its results via tm_dialog.  I did a similar thing in  
writing a tool that asks BibDesk for citation completions, and it  
works pretty well.

-- Adam



More information about the textmate mailing list