[SVN] r7208 (HTML)

Allan Odgaard throw-away-1 at macromates.com
Tue May 15 22:05:04 UTC 2007


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).

> 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”. 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.






More information about the textmate-dev mailing list