iamcco / iamcco/markdown-preview.nvim
s:init() "au BufEnter" 在MD文件作为gvim --remote-tab-silent首个打开文件时会有问题
Open
bug
help wanted
- Dominant language
- JavaScript
- Stars
- 8k
- Forks
- 411
- PR merge metrics
- No merged PRs in 30d
Description
如果使用gvim --remote-tab-silent首次打开MD文件时(此时gvim会注册servername "GVIM"),似乎BufEnter状态无法正确识别,因此s:init_command()和s:MkdpAU()都不能正常执行,只有使用givm --remote-tab-silent再打开任意一个文件后,才正常。
我把BufEnter改为BufRead,问题消失。
function! s:init() abort
if g:mkdp_command_for_global
au BufEnter * :call s:MkdpAU()
else
au BufEnter *.{md,mkd,markdown,mdown,mkdn,mdwn} :call s:MkdpAU()
endif
if g:mkdp_auto_start
au BufEnter *.{md,mkd,markdown,mdown,mkdn,mdwn} call mkdp#util#open_preview_page()
endif
endfunction
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.