Closed serend1p1ty closed 5 years ago
你用什么插件管理插件安装的?还有用的什么命令?如果是vim-plug 试试升级 vim-plug 本身试下
@iamcco 谢谢您的回复。 已经是最新的vim-plug了。 vimrc里面的命令是
Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': 'markdown' }
这个报错很奇怪,不是安装失败,而是根本找不到这个命令。
把 'for': 'markdown'
去掉看看
或者改成 Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']}
@iamcco 现在电脑不在身边了,明天我尝试下。谢谢你了。
@iamcco 我借了别人电脑试了一下,果然是vim-plug中for语法的问题。写成
Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']}
就可以了。 真神奇,for不是控制一个插件安装之后是否加载它吗?按理说插件还未安装的时候,for应该是没用的呀。
hook 是安装完调用的
了解,感谢。
我也遇到了类似的问题,使用的是 vim-plug,奇怪的是之前使用
Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': 'markdown' }
是没有问题的,最近才出现这个问题。
@jdhao
是不是加了 for markdown,需要加上 vim-plug
Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']}
我加上 vim-plug,好像也有点问题,后来全部去了,就可以正常安装了。。
加上 vim-plug
是啥问题?
我刚才重新测试了一下,加上 vim-plug 没问题,之前有问题,可能是我安装插件以后没有重启 Neovim 导致的。
Is it worth adding this fix to the README.md
? happy to make that change if you agree was having this issue for months before I found this issue
@Akin909 looks good to me.
This may be caused by post-update hook bug of vim-plug, see https://github.com/junegunn/vim-plug/issues/964, after fixed, the following line
Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': 'markdown' }
should work fine without adding 'for': 'vim-plug'
. Before fixed, I have been using
Plug 'iamcco/markdown-preview.nvim', { 'do': ':call mkdp#util#install()', 'for': 'markdown' }
which also is supposed by vim-plug to solve this problem.
I just tried removing vim-plug from the for
and hit the same error as before, and I'm on the latest vim plug version :cry:
我在win10下gvim8.2按教程配置了默认.vimrc后还是报错
这是我的插件配置文件:
我在win10下gvim8.2按教程配置了默认.vimrc后还是报错
这是我的插件配置文件:
也是win10,vim8.2。一样的症状,报错: [vim-node-rpc] pre build and node not found! Pre build and node is not found
Invalid expression: > mkdp#util#install() }, 'for': ['markdown', 'vim-plug']}) what is this?
Thanks! it's works for me ~/.vimrc
" Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']}
Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': 'markdown' }
then, :call mkdp#util#install()
Consider using the plug-in manager to see if the plug-in has been successfully installed.
I'm still getting this error with both
Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': 'markdown' }
and
Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']}
I should be on latest vim-plug.
The full error is:
x Post-update hook for markdown-preview.nvim ... Vim(call):E117: Unknown function: mkdp#util#install
Edit: I ended up installing this through Nix and skipping vim-plug altogether.
I am getting this error as well. I can get past it by running :call mkdp#util#install()
manually, but then it says
E903: Process failed to start: no such file or directory: "/home/elaina/.vim/plugged/markdown-preview.nvim/app/bin/markdown-preview-linux"
even though the file is there, with execute permission.
None of the solutions above helped me, so I just switched to the second option of installing this plugin from the README — by installing npm (here I install it via nvm) and yarn:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
nvm install stable
nvm use stable
npm install -g yarn
with this line in my vim config:
Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && yarn install' }
I'm still getting the same error but can solve this by manually calling :call mkdp#util#install()
as @cocoliliace mentioned above.
安装插件的时候报错:
vim是官网最新build的版本。https://github.com/vim/vim-win32-installer/releases 系统:win10