spell check markdown and tex files

This commit is contained in:
krolyxon 2023-03-25 01:07:05 +05:30
parent 6c34b63a2b
commit 15c11bb630
1 changed files with 19 additions and 0 deletions

View File

@ -18,3 +18,22 @@ autocmd({ "BufWritePre" }, {
pattern = "*", pattern = "*",
command = [[%s/\s\+$//e]], command = [[%s/\s\+$//e]],
}) })
-- Don"t auto commenting new lines
autocmd("BufEnter", {
pattern = "",
command = "set fo-=c fo-=r fo-=o"
})
-- spell check markdown and tex files
vim.cmd([[
augroup spellCheck
autocmd!
autocmd Filetype plaintext setlocal spell
autocmd FileType markdown setlocal spell
autocmd BufRead,BufNewFile *.md setlocal spell
autocmd BufRead,BufNewFile *.rmd setlocal spell
autocmd BufRead,BufNewFile *.Rmd setlocal spell
autocmd BufRead,BufNewFile *.tex setlocal spell
augroup END
]])