Scintilla, the editing component powering Notepad++, uses an autocompletion algorithm that does not scale well to very large predefined lists of words. This is a problem if, for example, you want to autocomplete any word from the Merriam-Webster English Dictionary, which contains tens of thousands of words.
This plugin uses the trie data structure and a case-insensitive trie variant to store large numbers of words in a way that is amenable to autocompletion, albeit rather memory-intensive.
In addition, you can define different autocompletion lists for different file types. To get you started, a list of autocompletions for the PythonScript plugin is included in this repository.
- Download version 3 or higher of the PythonScript plugin.
- Download the code of this repo.
- Unzip the downloaded code into a folder named
dictautocomp
. - Drop the new
dictautocomp
folder in%Appdata%\Roaming\Notepad++\plugins\config\PythonScript\scripts
- Go to
Plugins->Python Script->Configuration...
from the main menu, finddictautocomp\dictautocomp.py
from the list as shown in the below image, selectUser Scripts
, and click the leftmostAdd
button. - At this point
dictautocomp
will be on the short list of PythonScript scripts, and if desired you can add a keyboard shortcut fromMacro->Modify Shortcut/Delete Macro...
from the main menu, as shown in the below image. NOTE: you will need to restart Notepad++ for dictautocomp to appear on this list.
- Run
Plugins->Python Script->dictautocomp
- It will pop up a dialog showing you the current configuration; you can hit OK here
- It will pop up a second dialog: if you want to add a new dictionary or remove a dictionary in the current config, fill out the form and hit OK; otherwise, hit Cancel to not add another dictionary
- If you are in a file whose extension that matches the "extensions" field from either the "current configuration" from step 2 or the new dictionary configuration you added in step 3, then as you type, the auto-completion will include the words from the dictionary
- This auto-completion will continue until you exit Notepad++. The next time you run the application, you will have to run this script again.