~dricottone/vim-markdown-preview

ref: 906c7a8f843747878b8ec2da262a57218f1661c1 vim-markdown-preview/plugin/vim-markdown-preview.vim -rw-r--r-- 576 bytes
906c7a8f — Jamshed Vesuna Initial commit 10 years ago
                                                                                
906c7a8f Jamshed Vesuna
1
2
3
4
5
6
7
8
9
10
11
12
13
"============================================================
"                    Vim Markdown Preview
"   git@github.com:JamshedVesuna/vim-markdown-preview.git
"============================================================

function! Vim_Markdown_Preview()
  :let curr_file = expand('%:t')
  :call system('markdown ' . curr_file . ' > /tmp/vim-markdown-preview.html' . ' && open -g /tmp/vim-markdown-preview.html')
  :sleep 314m
  :call system('rm /tmp/vim-markdown-preview.html')
endfunction

autocmd Filetype markdown,md map <buffer> <C-p> :call Vim_Markdown_Preview()<CR>