diff --git a/.vimrc b/.vimrc index d79c467..806362f 100644 --- a/.vimrc +++ b/.vimrc @@ -362,7 +362,19 @@ hi SpellCap cterm=underline ctermbg=none hi SpellBad cterm=underline ctermbg=none hi SpellLocal cterm=underline ctermbg=none hi SpellRare cterm=underline ctermbg=none - + +" --------------------------------------------------------------------------------------------------------------------- +" ==> Markdown autoread, autowrite +" Autocommands for Markdown files +augroup markdown_settings + " Remove any existing autocommands in this group + autocmd! + " Set autoread and autowriteall for markdown files + autocmd BufReadPost,BufNewFile *.md setlocal autoread autowriteall + " Optional: Trigger checktime more frequently when idle in markdown buffers + autocmd CursorHold,CursorHoldI *.md checktime +augroup END + " --------------------------------------------------------------------------------------------------------------------- " ==> Templates: markdown documents with frontmatter (.md)