From: Huck Boles Date: Tue, 30 May 2023 21:40:57 +0000 (-0500) Subject: added: autofunc for textwidth on text files X-Git-Url: https://git.huck.website/?a=commitdiff_plain;h=9c42846395b5982b40edb57d1bf754563baba5e9;p=nvim.git added: autofunc for textwidth on text files --- diff --git a/lua/huck/functions.lua b/lua/huck/functions.lua index bb58736..37f3e84 100644 --- a/lua/huck/functions.lua +++ b/lua/huck/functions.lua @@ -17,6 +17,14 @@ vim.api.nvim_create_autocmd("BufWinEnter", { end, }) +-- set text width +vim.api.nvim_create_autocmd("BufWinEnter", { + pattern = { "*.md", "*.txt" }, + callback = function() + vim.o.textwidth = 80 + end, +}) + -- check template folder and if a template.[filetype] exists use it vim.api.nvim_create_autocmd("BufNewFile", { pattern = { "*" },