1

I'm willing to experiment with WebGL and currently using three.js to make my content.
My editor of choice was SublimeText 2.

The problem I have is that I do not get auto completion unless I use that variable/method/package before. So just pressing a dot char and expecting to get a full list of variables and methods doesn't work.

Is there a way to do that in either SublimeText 2 or SublimeText 3?

3 Answers 3

2

Check out the SublimeCodeIntel plugin, available through Package Control. Set up properly, it will index files and directories you tell it to, and will provide "semi-intelligent" autocompletion for classes, methods, function arguments, etc. I haven't used it much with JavaScript, but if its performance in Python coding is any indicator, it's a huge help to more rapid coding, as well as working with sometimes-unfamiliar libraries.

2

You can get the atucomplete for Three.js by installing the Three.js Autocomplete package using package control:

Threejs sublime can be installed through package control.

Command+Shift+P
Package Control: Install Package
Select Three.js Autocomplete

Or you can install it manually by getting it form the repository: https://github.com/blackjk3/threejs-sublime

If everything is installed correctly you should be able to start typing 'THREE.' and get auto completion. Enjoy!

1

Either the CodeIntel or Tern plugin should work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.