.vim/ftplugin/markdown.vim

Sat, 30 Oct 2021 19:58:51 -0400

author
Meredith Howard <mhoward@roomag.org>
date
Sat, 30 Oct 2021 19:58:51 -0400
changeset 955
54192edeb4e5
parent 931
55c477df9d1b
permissions
-rw-r--r--

lsp diagnostics can chill

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