DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

Meteor Codes Auto Completion in Vim


On ArchLinux

  1. Install node.js: sudo pacman -S nodejs;

  2. Install tern_for_vim:

    $ cd ~/.vim/bundle
    $ git clone https://github.com/marijnh/tern_for_vim.git
    $ cd tern_for_vim
    $ npm install
    
  3. Install meteor plugin for tern tern-meteor: download meteor.js from this site to folder ~/.vim/bundle/tern_for_vim/node_modules/tern/plugins;

  4. 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": {}
      }
    }
    
  5. Now when you edit .js file, use C-x,C-o to trigger autocompletion.

Ref:

Installing Node.js via package manager;



Published

Dec 3, 2014

Last Updated

Dec 3, 2014

Category

Tech

Tags

  • auto complete 1
  • meteor 47
  • vim 92

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor