How do I activate my autocompleter when typing in a new word?

autocomplete

#1

In this example, the completion regex is defined using the following Code:

handler.getCompletionRegex = function() { return /^\.$/; }
However, this way auto completion only starts at the beginning of a line or when entering a “.”. I would like the completion suggestions to come up every time a new word is typed, which means a white space should trigger auto completion as well. However, the following regex does not achieve what I intend to:

/^\.\s$/


#2

/^\.\s$/ would match dot followed by whitespace, try /^[.\s]$/ instead