Use tern-for-vim to complete js code, but there is no way to complete some global variables, such as: setTimeout setInterval, document and other objects.
As shown below
Completion of ordinary variables is normal
迷茫2017-05-16 16:39:48
The configuration of YCM javascript has been modified, and it can now be triggered automatically. https://github.com/ruanyl/bigvim/commit/7db7951aba173eab6d93858f212b79b88c84da49