.vim/ftplugin/markdown.vim

Thu, 11 Apr 2024 13:19:32 -0400

author
Meredith Howard <mhoward@roomag.org>
date
Thu, 11 Apr 2024 13:19:32 -0400
changeset 1146
2c9d3c1940a4
parent 931
55c477df9d1b
permissions
-rw-r--r--

Add catlee/pull_diags.nvim

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