5

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?

Joey Yi Zhao
  • 23,254
  • 37
  • 138
  • 276
  • I've managed to slog a bit further, at least the commands are recognized, though output nothing. You probably did not install the `tern_for_vim` plugin correctly. You should do it, as you do for other your plugins. As for me I use Vundle, so I just added appropriate instructions to my `vimrc` file. – Dmitry Koroliov Jun 01 '17 at 00:59

0 Answers0