[TxMt] Re: Order of suggestion of autocomplete items

Bert Zangle zanglebert at gmail.com
Mon Oct 17 15:38:32 UTC 2016


Allan Odgaard-4 wrote
> If you can provide a simple example where it inserts non-word characters 
> as completion candidates, feel free to share it, as this behavior does 
> sound like something worth looking into.

Sure. Here's two examples in Python (with lots of numpy code):

Example 1.

Autocomplete for:
,
suggests:
,:,
(probably) from the following (commented out) line:
# for j in range(len(dV1[0,:,0])):

Example 2.

Autocomplete for same character, same file:
,
suggests:
,:])):
(probably) from the following code line:
for j in range(len(m_v[0,:])):

Does that help/narrow down the problem?

To anticipate the question "Why would you ever autocomplete on comma to
begin with?", the answer is, because I'd like to autocomplete:
print(something,
with:
print(something, "\n")
or maybe even:
print(something, "\n", sep='')
...if I'm feeling fancy when debugging.

That's why I added:
, "\n"
and:
, sep=''
... to my user completion list.

Not exactly a common use case I guess, and not high priority either, but,
since you asked, that's the context where autocomplete suggests the
non-letter completions above.



--
View this message in context: http://textmate.1073791.n5.nabble.com/Order-of-suggestion-of-autocomplete-items-tp30827p30934.html
Sent from the textmate users mailing list archive at Nabble.com.


More information about the textmate mailing list