Skip to content

Commit

Permalink
Setup par for md files
Browse files Browse the repository at this point in the history
  • Loading branch information
steveno committed Aug 21, 2024
1 parent 240b4ee commit 502cf14
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions dot_config/nvim/lua/autocmd.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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',
})

0 comments on commit 502cf14

Please sign in to comment.