One of the sources of completions for the autocomplete panel is indeed words sourced from the buffer.
Regardless of anything else, you should be able to manually invoke the autocomplete panel at any point (Ctrl+Space on Windows and MacOS or Alt+/ on Linux) and get those completions. You can also start typing a word and then press Tab to cycle through matching completions.
The only exception to this is that plugins that provide custom, language specific completions can block buffer completions from appearing in the completion list.
Presuming you want the autocomplete panel to appear automatically as you type regardless of file type, the auto_complete_selector
setting controls this. It specifies in what situations the autocomplete panel should automatically appear.
In particular, it’s set by default to specifically not trigger in plain text files because many people find it annoying to have the panel pop up repeatedly as they’re entering non-code related text.
If you’d like that ability, use Preferences > Settings
to open the settings window. In the last hand pane, find the auto_complete_selector
setting and copy it from there into your personal settings in the right hand pane, and then modify the value to include , text.plain
at the end. That would look something like this:
"auto_complete_selector": "meta.tag, source - comment - string.quoted.double.block - string.quoted.single.block - string.unquoted.heredoc, text.plain",
That preserves the default setting but also includes plain text files as places where autocomplete should be automatically offered.
You can replace text.plain
here with text.html
if you want to trigger on words in HTML and Markdown files, text.html.markdown
if you want completions in Markdown files only, or just text
to allow for completions in all of those situations at once, depending on what you’re doing.
If you’re working with some other sort of non-text file than just text files like these (as visible in the bottom right of the window’s status bar) what you would put in that setting would possibly be different. Let us know if that’s the case and we can guide further.