Let’s say we have jCrop and jQuery in our project.
example1.js uses only jCrop because we specifed at project-level that we use this library for the whole project (and thus we may need autocompletion for jCrop in any file).
example2.html will use jQuery and jCrop so autocompletion will be available for both libraries.
These settings will be stored in the project file, so you can share it via your VCS to other members of your project, so that they will be ready-to-go just by checking out project files.
“Download Library” Intention
Assuming that jQuery library hasn’t been defined yet, you can move the caret to “http://code.jquery.com/…” string, press Alt+Enter/Option+Enter and choose “Download Library” from the list of available intention actions:
It may take a while before the library is downloaded but eventually you will see the message “Successfully downloaded http://code.jquery.com/jquery-1.4.3.js”. The downloaded file will be stored in your local file system for code completion and navigation to work.
Download the latest WebStorm/PhpStorm EAP and try this.