vim安装coc插件⾃动补全
第⼀步,安和装nodejs和yarn
curl -w.sh | bash
curl --compressed -o- -L yarnpkg/install.sh | bash
第⼆步,打开.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'
vim编辑器下载与安装" 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会⾃动从下载对应的语⾔扩展,但是⽹站被屏蔽,需要修改到阿⾥源。
修改npm⽅法:
1.原npm地址
npm config set registry
2.设置国内镜像
a.通过config命令
npm config set registry registry.
npm info underscore (如果上⾯配置正确这个命令会有字符串response)
b.命令⾏指定
npm --registry registry. info underscore
c.编辑~/.npmrc加⼊下⾯内容
registry = registry.
3.使⽤nrm管理registry地址
a.下载nrm
npm install -g nrm
b.添加registry地址
nrm add npm
nrm add taobao registry.
c.切换npm registry地址
nrm use taobao
nrm use npm
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论