How to setup tern-vim in my project?

不羁的心 提交于 2019-12-06 03:02:58

问题


I want to setup tern-vim in my project and followed this link https://github.com/ternjs/tern_for_vim/blob/master/doc/tern.txt. After installation, I created a .tern-project file under the root directory of my project as below.

{
      "libs": [
        "browser",
        "jquery"
      ],
      "loadEagerly": [
        "importantfile.js"
      ],
      "plugins": {
        "requirejs": {
          "baseURL": "./",
          "paths": {}
        }
      }
    }

When I open a js file by vim command, I can't use any tern command as below:

|:TernDoc|...................... Look up Documentation
    |:TernDocBrowse|................ Browse the Documentation
    |:TernType|..................... Perform a type look up
    |:TernDef|...................... Look up definition
    |:TernDefPreview|............... Look up definition in preview
    |:TernDefSplit|................. Look up definition in new split
    |:TernDefTab|................... Look up definition in new tab
    |:TernRefs|..................... Look up references
    |:TernRename|................... Rename identifier

I will get Not an editor command error. Do I need to do any other configuration?

来源:https://stackoverflow.com/questions/41541755/how-to-setup-tern-vim-in-my-project

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!