Home Download Buy Blog Forum Support

change priority of completions

change priority of completions

Postby pier on Fri Nov 23, 2012 7:05 pm

So I have this long completions file, which works great.

The problem is that completion from words in the current file get obscured or ignored, if the word has some similarity with one from the completions file. I have already augmented the "auto_complete_size_limit" and still I cannot get completion for some words in the current file.

According to the documentation http://sublimetext.info/docs/en/referen ... tions.html

Priority of Sources for Completions
Snippets
API-injected completions
.sublime-completions files
Words in buffer


So is there a way to give priority to word from the current file over completions files?
Is there a way to disable fuzzy search on a specific completions file?
pier
 
Posts: 92
Joined: Fri Jun 15, 2012 2:47 am

Re: change priority of completions

Postby agibsonsw on Fri Nov 23, 2012 8:12 pm

I got around this in my PythonCompletion.py file. I obtain the standard completions using extract_completions, add them to (extend) my own completions list - either inserting them at the top or, as I do, sorting the entire list - then inhibiting these standard completions. I also took the opportunity to add the description 'Default' to the standard completions.

I don't know about disabling fuzzy search, as I didn't really need to do (or attempt) this.
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
agibsonsw
 
Posts: 901
Joined: Fri Jan 27, 2012 9:11 pm

Re: change priority of completions

Postby pier on Fri Nov 23, 2012 9:28 pm

agibsonsw wrote:I got around this in my PythonCompletion.py file. I obtain the standard completions using extract_completions, add them to (extend) my own completions list - either inserting them at the top or, as I do, sorting the entire list - then inhibiting these standard completions. I also took the opportunity to add the description 'Default' to the standard completions.

I don't know about disabling fuzzy search, as I didn't really need to do (or attempt) this.


Thanks for the tip, I'll check your python file.

In the mean time it seems I have been able to overcome this by using the all autocomplete package. I suppose it must do something similar to your own PythonCompletion.py

Thanks again!
pier
 
Posts: 92
Joined: Fri Jun 15, 2012 2:47 am

Re: change priority of completions

Postby Binocular222 on Mon Jun 03, 2013 1:27 pm

Hi agibsonsw and pier,
Sorry for being dumb at Python, but can you share your .py solution?
I want give "Word in Buffer" higher priority than \Data\Packages\Autohotkey\Autohotkey.sublime-completions
so, what .py should be?
Binocular222
 
Posts: 55
Joined: Sat May 18, 2013 4:10 pm


Return to Technical Support

Who is online

Users browsing this forum: Google [Bot] and 19 guests