Testing autowrite,autoread for md files
Will autosave Markdown files on exit. Should also read changes made outside of Vim. Purpose: to minimize file conflicts in Syncthing.
This commit is contained in:
14
.vimrc
14
.vimrc
@@ -362,7 +362,19 @@ hi SpellCap cterm=underline ctermbg=none
|
|||||||
hi SpellBad cterm=underline ctermbg=none
|
hi SpellBad cterm=underline ctermbg=none
|
||||||
hi SpellLocal cterm=underline ctermbg=none
|
hi SpellLocal cterm=underline ctermbg=none
|
||||||
hi SpellRare 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)
|
" ==> Templates: markdown documents with frontmatter (.md)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user