.vim/ftplugin/markdown.vim

Fri, 29 Dec 2023 03:02:51 -0600

author
Meredith Howard <mhoward@roomag.org>
date
Fri, 29 Dec 2023 03:02:51 -0600
changeset 1139
1359a563b5ce
parent 931
55c477df9d1b
permissions
-rw-r--r--

split out LuaSnip spec

runtime ftplugin/text.vim
setl equalprg=pandoc\ -f\ markdown\ -t\ markdown

if !exists('b:markdown_autohtml')
  let b:markdown_autohtml = 0
endif

function! s:autohtml() abort
  if get(b:, 'markdown_autohtml', 0)
    silent !md2html -o "%:p.html" "%:p"
  endif
endfunction

augroup Markdown
  autocmd!
  autocmd BufWritePost <buffer> call s:autohtml()
augroup END

mercurial