标签:npm 插件 补全 nrm vim taobao registry org
第一步,安和装nodejs和yarn
curl -sL install-node.now.sh | bash curl --compressed -o- -L https://yarnpkg.com/install.sh | bash
install-node.now.sh是一个网站,curl打开他的时候会下载一个sh文件,这两个名字可能需要sudo命令才能执行,并且| 后面的bash也要加sudo。
第二步,打开.vimrc文件,在vim.plug配置中安装coc.vim
call plug#begin() " The default plugin directory will be as follows: " - Vim (Linux/macOS): '~/.vim/plugged' " - Vim (Windows): '~/vimfiles/plugged' " - Neovim (Linux/macOS/Windows): stdpath('data') . '/plugged' " You can specify a custom plugin directory by passing it as the argument " - e.g. `call plug#begin('~/.vim/plugged')` " - Avoid using standard Vim directory names like 'plugin' " Make sure you use single quotes " Use release branch (recommend) Plug 'neoclide/coc.nvim', {'branch': 'release'} " Initialize plugin system call plug#end()
保存退出后,在VIM普通模式中输入命令:
:PlugInstall##安装coc.nvim :CocInfo##测试是否安装成功
第三步,安装coc语言扩展
#vim下输入 :CocInstall coc-clangd ##安装 C/C++/Objective-C 扩展
这里cocinstall会自动从https://registry.npmjs.org下载对应的语言扩展,但是网站被屏蔽,需要修改到阿里源。
修改npm方法:
1.原npm地址
npm config set registry http://registry.npmjs.org
2.设置国内镜像
a.通过config命令
npm config set registry https://registry.npm.taobao.org npm info underscore (如果上面配置正确这个命令会有字符串response)
b.命令行指定
npm --registry https://registry.npm.taobao.org info underscore
c.编辑 ~/.npmrc
加入下面内容
registry = https://registry.npm.taobao.org
3.使用nrm管理registry地址
a.下载nrm
npm install -g nrm
b.添加registry地址
nrm add npm http://registry.npmjs.org
nrm add taobao https://registry.npm.taobao.org
c.切换npm registry地址
nrm use taobao
nrm use npm
标签:npm,插件,补全,nrm,vim,taobao,registry,org 来源: https://www.cnblogs.com/alhope/p/15773474.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。