Increasing the minimum word size for the Sublime Text 3 plugin All Autocomplete

All Autocomplete is an ST3 plugin that I first thought was sort of a gimmick, but turns out to very useful. Normally automatic autocompletion (meaning not coming from snippets or autocompletion files) uses words only in the currently-open document. All Autocomplete uses all open documents.

A disadvantage, however, is that it includes words with three characters or more which, for my taste, clutters up the popups. But this minimum is directly in the plugin code, not a preference-file.

To increase this value from three to five, first extract them with the PackageResourceViewer plugin (or just unzip it… *.sublime-package files are just renamed zip files). This creates the directory

C:\Users\jeffy\AppData\Roaming\Sublime Text 3\Packages\All Autocomplete\

In that directory, open all_views_completions.py and change

MIN_WORD_SIZE = 3

to

MIN_WORD_SIZE = 5

This directory overrides the package file. You could also re-zip this back into the file, and delete the directory.

The bad thing about this setting being directly in the code, instead of in a configuration file, is that this change must be made each time AllAutocomplete is updated.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s