youcompleteme如何补全html中的js?

1 安装node
curl -o- https://raw.githubusercontent... | bash
source ~/.nvm/nvm.sh
nvm install node
2 安装tern_for_vim
$ cd ~/.vim/bundle
$ git clone https://github.com/marijnh/te...
3 安装YouCompleteMe
cd ~/.vim/bundle/YouCompleteMe
$ ./install.sh --clang-completer --tern-completer
4 建立 .tern-project
在用户根目录 ~/ 下建立 .tern-project 文件

{
    "libs": [
        "browser",
        "underscore",
        "jquery"
    ],
    "plugins": {
        "node": {}
    }
}

现在,我编辑 vim test.js

输入 document.后,自动出现补全
图片描述

vim test.html
此时,输入 document.后 ,不出现自动补全,请问,怎么办呢?

阅读 4.6k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题