.config/nvim/after/ftplugin/markdown.vim

Sat, 08 Apr 2023 14:27:17 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Sat, 08 Apr 2023 14:27:17 -0500
changeset 1103
0c1f1cf78ed9
parent 1029
9265f8508e4c
child 1163
40367220022e
permissions
-rw-r--r--

remove ssh config makefile stuff

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