Getting full JS autocompletion under Sublime Text
Ternjs is a new alternative for getting JS autocompletion. http://ternjs.net/
Sublime Plugin
The most well-maintained Tern plugin for Sublime Text is called 'tern_for_sublime'
There is also an older plugin called 'TernJS'. It is unmaintained and contains several performance related bugs, that cause Sublime Text to crash, so avoid that.
Suggestions are (basically) based on the text in the current open file and any snippets or completions you have defined (ref). If you want more text suggestions, I'd recommend:
- Adding your own snippets for commonly used operations.
- Adding your own completions for common words.
- Adding other people's snippets through Package Control.
- You can find even more snippets on github.
- Use Zen coding (available through Package Control) or Emmet.
- There are also various packages that adjust the way code completion works. I love SublimeCodeIntel, but check out other answers to this question for more options.
As a side note, I'd really recommend installing Package control to take full advantage of the Sublime community. Some of the options above use Package control. I'd also highly recommend the tutsplus Sublime tutorial videos, which include all sorts of information about improving your efficiency when using Sublime.