diff --git a/dot_config/nvim/lua/autocmd.lua b/dot_config/nvim/lua/autocmd.lua index dad5036..0fd9825 100644 --- a/dot_config/nvim/lua/autocmd.lua +++ b/dot_config/nvim/lua/autocmd.lua @@ -7,12 +7,20 @@ vim.api.nvim_create_autocmd({ 'FileType' }, { command = 'setlocal noexpandtab', }) +-- Setup skeleton file shell scripts vim.api.nvim_create_autocmd({ 'BufNewFile' }, { pattern = '*.sh', command = '0r ~/.config/nvim/templates/skeleton.sh', }) +-- Setup skeleton for python vim.api.nvim_create_autocmd({ 'BufNewFile' }, { pattern = '*.py', command = '0r ~/.config/nvim/templates/skeleton.py', }) + +-- Use par to format markdown at 80 chars +vim.api.nvim_create_autocmd({ 'BufNewFile' }, { + pattern = '*.md', + command = 'set formatprg=par tw=80', +})