我参照这篇文章 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 里面进行是这个含义吧?