preservim / vim-markdown

Markdown Vim Mode
4.68k stars 521 forks source link

Hilight disapper when this plugin is lazy load. #268

Open wsdjeg opened 8 years ago

wsdjeg commented 8 years ago

I just try call

dein#add('plasticboy/vim-markdown',{'lazy':1,'on_ft':'markdown'})

if this plugin is lazy load then reproduce step is here

  1. vim read.md
  2. open ctrlp
  3. select one other file with different filetype then we will get this issue https://github.com/ctrlpvim/ctrlp.vim/issues/202
zgpio commented 6 years ago

trigger FileType event will break the markdown highlight. after :e command, highlight work again.

Congee commented 5 years ago

Same issue. I use https://github.com/sheerun/vim-polyglot to load plasticboy/vim-markdown.

:e command doesn't work for me.

Congee commented 5 years ago

I found sheerun/vim-polyglot doesn't play nicely with plasticboy/vim-markdown

https://github.com/sheerun/vim-polyglot/issues/152#issuecomment-497419925

not sure which end should resolve this issue

lfilho commented 5 years ago

Same here. :e does work for me though. The other difference is that I'm using Plug instead of dein.

mrbeardad commented 4 years ago

Comment 872th line in ftplugin/mrakdown.vim will fix my problem:

    autocmd BufWinEnter <buffer> call s:MarkdownRefreshSyntax(1)
davidroeca commented 1 year ago

I also have the same problem using vim-packager. :edit works for me, and with the help of @mrbeardad above, I was able to add this block to my vim config as a fix:


" https://github.com/preservim/vim-markdown/issues/268
augroup markdown_fix
  autocmd!
  autocmd BufWinEnter *.md execute ":edit"
augroup END