tern_for_vim安装出现问题

发布于 2022-09-05 04:26:11 字数 2282 浏览 21 评论 0

我参照这篇文章 http://www.jianshu.com/p/4a8b...
为JAVASCIPT配置。

配置 Tern

1,在Tern目录下执行npm install

cd ~/.vim/bundle/tern_for_vim

npm install

2, 在你的项目根目录创建 .tern_project 文件,并配置

touch .tern_project

两个问题
问题1:我的npm install运行成功了吗?

cd  ~/.vim/bundle
debian8@debian:~/.vim/bundle$ git clone https://github.com/ternjs/tern_for_vim.git
Cloning into 'tern_for_vim'...
remote: Counting objects: 348, done.
remote: Total 348 (delta 0), reused 0 (delta 0), pack-reused 348
Receiving objects: 100% (348/348), 84.68 KiB | 119.00 KiB/s, done.
Resolving deltas: 100% (158/158), done.
debian8@debian:~/.vim/bundle$ cd tern_for_vim
debian8@debian:~/.vim/bundle/tern_for_vim$ npm instal

Usage: npm <command>

where <command> is one of:
    access, adduser, bin, bugs, c, cache, completion, config,
    ddp, dedupe, deprecate, dist-tag, docs, doctor, edit,
    explore, get, help, help-search, i, init, install,
    install-test, it, link, list, ln, login, logout, ls,
    outdated, owner, pack, ping, prefix, prune, publish, rb,
    rebuild, repo, restart, root, run, run-script, s, se,
    search, set, shrinkwrap, star, stars, start, stop, t, team,
    test, tst, un, uninstall, unpublish, unstar, up, update, v,
    version, view, whoami

npm <command> -h     quick help on <command>
npm -l           display full usage info
npm help <term>  search for help on <term>
npm help npm     involved overview

Specify configs in the ini-formatted file:
    /home/debian8/.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config

npm@5.0.3 /usr/lib/node_modules/npm
 ╭─────────────────────────────────────╮
 │                                      │
 │   Update available 5.0.3 → 5.1.0     │
 │     Run npm i -g npm to update       │
 │                                      │
 ╰─────────────────────────────────────╯

问题2:项目根目录创建 .tern_project 文件
请问,这里的项目根目录,究竟是什么含义?

mkdir /home/myjs_project
cd /home/myjs_project
touch .ter_project
以后,我编辑js文件必须都在 /home/myjs_project 里面进行是这个含义吧?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文