[TxMt] Re: case insensitive code completion

Allan Odgaard mailinglist at textmate.org
Sun Jan 10 22:51:43 UTC 2016


On 21 Nov 2015, at 19:58, Nathan wrote:

> […] The result is that fmt. [option+esc] [p] and pressing [Enter] 
> gives me:
>
> fmt.print
>
> rather than the desired:
>
> fmt.Print
>
> I'm not really sure why it's done this way? Are there situations where
> people want their filtering keys over the text present in the menu?

This is a technical limitation of the dialog plug-in.

Right now, it can only insert new text, not change existing text.

So whatever the user typed (which is used as filter string), it leaves 
in the document, which does make the case-insensitive mode a bit useless 
when it’s only meant for the filter string.

> While I'm talking about code completion, and to drive the point home, 
> I
> noticed that TMDIncrementalPopUpMenu uses a BEGINSWITH predicate. 
> Ideally
> it would use a fuzzy match with similar logic to Go To File... That 
> would
> allow typing something like:

This runs into the same limitation that the filter string is actually 
typed into the document and the dialog plug-in cannot change that.

In theory we could of course improve things, but it’s a non-trivial 
change.


More information about the textmate mailing list