作者yshihyu (yshihyu)
看板Editor
标题[vim ] Vim Markdown Preview
时间Sun Apr 2 00:07:07 2017
我使用 vim + grip 用 chrome Preview
我在vimrc 加一个函数如下
func Vim_Markdown_Preview()
let b:curr_file = expand('%:p')
call system('grip "' . b:curr_file . '" &')
endfunc
nnoremap <leader>m :call Vim_Markdown_Preview()<CR>
vim xxxx.md 之後call Vim_Markdown_Preview 透过 chrome
http://localhost:6419/
可以即时预览 , 但是我退出 vim 无法关闭 grip
我这边是用了 grip xxxx.md & 丢到 background , 要怎麽退出vim 时候 kill 这个 grip
process ?
有比较简单的作法嘛?
谢谢
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 175.181.186.197
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Editor/M.1491062830.A.759.html