Sublime Forum

Disabling content words in autocompletion pop-up. [resolved]

#1

Hi.

Screen of the problem:
mikebaza.com/image.png

Description:
I created a file named ‘Test’ with two words ‘Test’ and ‘TestTest’ and it seems that these words are being automatically added to autocompletion pop-ups. Which i don’t want to be done.

How can i resolve this issue?

0 Likes

#2

That’s how the built in auto complete functionality works. Since it doesn’t appear you want the autocompletion, add the following to your user settings.

"auto_complete": false
0 Likes

#3

I know that commnad but** i want do something other**.

docs.sublimetext.info/en/latest/ … tions.html
in this link you have order in which autocomplete works:

  • Snippets
  • API-injected completions
  • .sublime-completions files
  • Words in buffer

and I want exclude ‘Words in buffer’ from that list and leave other items. But how?

0 Likes

#4

I see, create a plugin with the following content. Think that should do what you want.

[code]import sublime
import sublime_plugin

class DisableCompletionListener(sublime_plugin.EventListener):
def on_query_completions(self, view, prefix, locations):
return (], sublime.INHIBIT_WORD_COMPLETIONS)[/code]

1 Like

#5

[size=120]Thank you very much Skuroda. Your code works.[/size]

For those who will have the same problem:

  1. make ‘step one’ with ‘Hello Word’ from this tutorial: net.tutsplus.com/tutorials/pytho … -2-plugin/
  2. replace code and past skuroda’s user code.
  3. restart ST2

This forum is great.

1 Like