vim: replace autocmds that just set 'filetype' with ftdetect
This commit is contained in:
parent
7b9b0c297b
commit
445e6c4a9d
3 changed files with 14 additions and 2 deletions
7
nvim/.config/nvim/ftdetect/srec.lua
Normal file
7
nvim/.config/nvim/ftdetect/srec.lua
Normal file
|
@ -0,0 +1,7 @@
|
|||
vim.cmd([[
|
||||
augroup SrecDetect
|
||||
autocmd!
|
||||
autocmd BufNewFile,BufRead *.sx,*.s19 set filetype=srec
|
||||
augroup END
|
||||
]])
|
||||
|
7
nvim/.config/nvim/ftdetect/vagrant.lua
Normal file
7
nvim/.config/nvim/ftdetect/vagrant.lua
Normal file
|
@ -0,0 +1,7 @@
|
|||
vim.cmd([[
|
||||
augroup VagrantDetect
|
||||
autocmd!
|
||||
autocmd BufNewFile,BufRead Vagrantfile set filetype=ruby
|
||||
augroup END
|
||||
]])
|
||||
|
|
@ -11,8 +11,6 @@ end
|
|||
|
||||
make_autocmds {
|
||||
buffers = {
|
||||
{ 'BufNewFile,BufRead', '*.sx,*.s19', 'set filetype=srec' },
|
||||
{ 'BufNewFile,BufRead', 'Vagrantfile', 'set filetype=ruby' },
|
||||
-- Make it possible to use `gf` to jump to my configuration modules.
|
||||
{ 'BufNewFile,BufRead', 'init.lua',
|
||||
"setlocal path+=~/.config/nvim/lua includeexpr=substitute(v:fname,'\\\\.','/','g')"},
|
||||
|
|
Loading…
Add table
Reference in a new issue