chore: add vim autocmds
c3d1f87f
2 file(s) · +19 −0
| 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 |
| 1 | 1 | source ~/.vim/options.vim |
|
| 2 | + | source ~/.vim/autocmds.vim |
|
| 2 | 3 | source ~/.vim/plugins.vim |
|
| 3 | 4 | source ~/.vim/keybinds.vim |
|
| 4 | 5 | source ~/.vim/fzf.vim |