markdown-preview.nvim: E117: Unknown function: mkdp#util#install
安装插件的时候报错:
Post-update hook for markdown-preview.nvim ... Vim(return):E117: Unknown function: mkdp#util#install
vim是官网最新build的版本。https://github.com/vim/vim-win32-installer/releases 系统:win10
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 26 (10 by maintainers)
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 usingPlug 'iamcco/markdown-preview.nvim', { 'do': ':call mkdp#util#install()', 'for': 'markdown' }
which also is supposed by vim-plug to solve this problem.
Thanks! it’s works for me ~/.vimrc
then,
:call mkdp#util#install()
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:
with this line in my vim config:
或者改成
Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']}