| 1 | " Vim has no built-in .mdx detection, so map it onto markdown while keeping |
| 2 | " an mdx component for filetype-specific autocommands and plugins. |
| 3 | augroup filetypedetect_mdx |
| 4 | autocmd! |
| 5 | autocmd BufNewFile,BufRead *.mdx setfiletype markdown.mdx |
| 6 | augroup END |
| 7 | |
| 8 | " Prose files: soft wrap at word boundaries, spell check |
| 9 | augroup prose_settings |
| 10 | autocmd! |
| 11 | autocmd FileType markdown,mdx,text call s:ProseSettings() |
| 12 | augroup END |
| 13 | |
| 14 | function! s:ProseSettings() abort |
| 15 | setlocal wrap |
| 16 | setlocal linebreak " Break at word boundaries |
| 17 | setlocal spell |
| 18 | endfunction |