预览时报错 server start failed.
tktujy opened this issue · comments
在Windows下使用预览,报错信息如下:
处理 function <SNR>40_serverStart[4]..mkdp#serverStart 时发生错误:
第 4 行:
server start failed
处理 function <SNR>40_serverStart 时发生错误:
第 4 行:
E171: 缺少 :endif
发现是某个文件第103行写漏了:
文件: markdown-preview.vim\autoload\mkdp.vim
96 fun! s:serverStart() abort "function for starting the server
97 let g:mkdp_port = g:mkdp_port + localtime()[7:10]
98 if s:mkdp_is_windows()
99 let l:cmd = "silent !start /b python " . '"' . s:path_to_server . '" ' . g:mkdp_port
100 if exists('g:mkdp_open_to_the_world')
101 let l:cmd = l:cmd . ' 0.0.0.0'
102 endif
103 exec lcmd
104 else
105 let l:cmd = "python " . s:path_to_server . " " . g:mkdp_port
106 if exists('g:mkdp_open_to_the_world')
107 let l:cmd = l:cmd . ' 0.0.0.0'
108 endif
109 call system(l:cmd . " >/dev/null 2>&1 &")
110 endif
111 endfun
fix, thank you