From 15c11bb630513a9a2140b7d772948831fa6cbdeb Mon Sep 17 00:00:00 2001 From: krolyxon Date: Sat, 25 Mar 2023 01:07:05 +0530 Subject: [PATCH] spell check markdown and tex files --- lua/core/autocmds.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lua/core/autocmds.lua b/lua/core/autocmds.lua index bfb0b28..d84c0f8 100644 --- a/lua/core/autocmds.lua +++ b/lua/core/autocmds.lua @@ -18,3 +18,22 @@ autocmd({ "BufWritePre" }, { pattern = "*", 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 +]])