On ArchLinux
-
Install node.js:
sudo pacman -S nodejs
; -
Install tern_for_vim:
$ cd ~/.vim/bundle $ git clone https://github.com/marijnh/tern_for_vim.git $ cd tern_for_vim $ npm install
-
Install meteor plugin for tern tern-meteor: download meteor.js from this site to folder ~/.vim/bundle/tern_for_vim/node_modules/tern/plugins;
-
Create a meteor project, create a .tern-project file under the project home:
{ "libs": [ "browser", "jquery", "underscore" ], "loadEagerly": [ "*.js", "*/*.js", "*/*/*.js", "*/*/*/*.js" ], "dontLoad": [ ".meteor" ], "plugins": { "meteor": {} } }
-
Now when you edit .js file, use C-x,C-o to trigger autocompletion.
Ref:
Installing Node.js via package manager;