iamcco / markdown-preview.nvim

markdown preview plugin for (neo)vim
MIT License
6.76k stars 280 forks source link

mac自带的vim8.0.1283能使用此插件吗 #166

Closed YunusZhang closed 4 years ago

YunusZhang commented 4 years ago

version: vim8.0.1283 系统:macos 10.14.1

安装描述:在markdown页面的时候,无法调出预览

报错信息:我输入:MarkdownPreview 的时候提示no matching autocommands

配置信息

" Markdown
Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install_sync() }, 'for' :['markdown', 'vim-plug'] }
Plug 'dhruvasagar/vim-table-mode', { 'on': 'TableModeToggle' }
Plug 'vimwiki/vimwiki'

设置快捷键

" Compile function
map r :call CompileRunGcc()<CR>
func! CompileRunGcc()
  exec "w"
  if &filetype == 'c'
    exec "!g++ % -o %<"
    exec "!time ./%<"
  elseif &filetype == 'cpp'
    exec "!g++ % -o %<"
    exec "!time ./%<"
  elseif &filetype == 'java'
    exec "!javac %"
    exec "!time java %<"
  elseif &filetype == 'sh'
    :!time bash %
  elseif &filetype == 'python'
    silent! exec "!clear"
    exec "!time python3 %"
  elseif &filetype == 'html'
    exec "!firefox % &"
  elseif &filetype == 'markdown'
    exec "MarkdownPreview"
  elseif &filetype == 'vimwiki'
    exec "MarkdownPreview"
  endif
endfunc

map R :call CompileBuildrrr()<CR>
func! CompileBuildrrr()
  exec "w"
  if &filetype == 'vim'
    exec "source $MYVIMRC"
  elseif &filetype == 'markdown'
    exec "echo"
  endif
endfunc

这两个函数好像也有问题: 1):call CompileRunGcc()调了之后没有反应 2):call CompileBuildrrr()调了之后报错:cannot redefine function CompileBuildrrr: It is in use

iamcco commented 4 years ago

不支持,vim需要8.1

YunusZhang commented 4 years ago

谢谢,那用之前的版本可以嘛,https://github.com/iamcco/markdown-preview.vim这个版本

iamcco commented 4 years ago

可以,不过不维护了

YunusZhang commented 4 years ago

我测试果使用旧版本,可以预览啦!