[TxMt] Text autocomletion, BBAutoComplete
Jeroen van der Ham
jeroen at je-ju.net
Sun Aug 7 20:30:22 UTC 2005
On 07-08-2005 21:05, Jim Woolum wrote:
> Does anyone (maybe Jeroen van der Ham, or some other Applescript
Erm, thanks for that compliment, but I know next to nothing about
Applescript ;) I only did a small script for python autocompletion that I
still intend to improve.
> know how to make BBAutoComplete (
> http://c-command.com/bbautocomplete/ ) work with TextMate? (For broad
> spectrum text autocompletion.)
I haven't tried out this app, it might work with TextMate eventually, but
it seems a bit odd to implement this with a seperate (closed source)
application. TextMate has almost everything needed in place to make it a
breeze to implement this kind of thing, using standard command-line tools
or a simple script in your favourite language.
TM already does completion based on the content of the current document.
I think this can be overloaded by disabling the default completion and
using a command bound to <esc>. We just need to build a small script
which generates the candidates and can loop through them. My Python
script already has some bits that can do that.
If I have some time I'd like to improve the script and do some better
candidate selection from the current document (it only works on the
current *saved* document now) and expand that to the documents that are
open or part of the project.
More information about the textmate