【发布时间】:2018-08-20 14:48:24
【问题描述】:
我已经通过这种方式安装了 tern_for_vim 和 YouCompleteMe 来完成 js。
1个安装节点
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
source ~/.nvm/nvm.sh
nvm install node
2 安装 tern_for_vim
$ cd ~/.vim/bundle
git clone https://github.com/marijnh/tern_for_vim
3 安装 YouCompleteMe
cd ~/.vim/bundle/YouCompleteMe
$ ./install.sh --clang-completer --tern-completer
4 编辑.tern-project
vim .tern-project
{
"libs": [
"browser",
"underscore",
"jquery"
],
"plugins": {
"node": {}
}
}
现在到 vim test.js。
在test.js文件中输入document.后弹出js补全。
然后到 vim test.html
在test.html文件中输入document.后没有js完成弹出。
如何解决?
【问题讨论】:
标签: javascript vim autocomplete