[SVN] r7208 (HTML)
Thomas Aylott (subtleGradient)
oblivious at subtlegradient.com
Wed May 16 01:19:42 UTC 2007
On May 15, 2007, at 6:05 PM, Allan Odgaard wrote:
> On 14. May 2007, at 16:20, Thomas Aylott (subtleGradient) wrote:
>
>>> Then we also only need one command, rather than a command per
>>> bundle (or per scope, as it seems is currently the case).
>>>
>>> So advantages:
>>> 1) only one command, not a command per bundle/scope
>>> 2) simpler code to read the list (no file I/O / plist parsing)
>>> 3) not going to be a problem for the user to update completions
>>> for bundles not in ~/Library
>>> 4) the completions do not poison the normal ⎋ completion carpus
>>>
>>> Disadvantages:
>>> 1) the completions you setup for this command are not available
>>> via ⎋
>>
>> Yes, I agree that if we do it with the environment variable we
>> should be able to have a single simple command.
>> Then anything that requires a different list of completions can
>> have a separate completion command or could simply inject values
>> into that environment variable.
>> CSS and Ruby both have more complex completion commands.
>>
>> HTML isn't a great example of how this should work since the
>> completions list is really crappy.
>> But CSS is a great example of how it should work. There's a single
>> definite list of completions for each scope. The list of escape
>> completions and menu completions should be the same.
>
> Another way to achieve getting the same list of completions also
> on ⎋ is by setting a completionCommand for the scope, which just
> returns the list from the environment (filtered to only contain
> items with TM_CURRENT_WORD as prefix).
oh carp! why didn't I think of that?!
>> I hate the thought of duplicating lists for both escape
>> completions and menu completions. But I guess that gives us the
>> option of having a different list for each. HTML is a good example
>> of things you'd want in the menu but not the escape list.
>
> Yeah, I think just considering the two types of completions
> different is the best for now. This is also what I do most of the
> time when working, i.e. ⎋ is for just repeating something I did a
> few lines ago, where ⌥⎋ is “go hunt (in the “standard
> library”) for something that I don’t want to type out myself”.
Yes! That is a great standard to go for.
Let's standardize on that concept and we'll be much better off.
> But I agree that there is overlap, but I think we should tackle
> this problem when we have 2.x out with an actual completion
> infrastructure, then TM could do the splicing of completion lists
> if requested on the various gestures used to call upon completion.
Just be sure to have your source code hosted online somewhere with
instructions on how to complete 2.0 incase aliens attack or something.
thomas Aylott — subtleGradient — CrazyEgg — sixteenColors
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate-dev/attachments/20070515/51f02162/attachment.html>
More information about the textmate-dev
mailing list