Auto reload

This commit is contained in:
Alex Yatskov 2024-08-04 17:59:34 -07:00
parent c8dc6dfcc7
commit 38091dbf67
2 changed files with 16 additions and 13 deletions

View File

@ -1,17 +1,19 @@
vim.api.nvim_create_autocmd({'BufRead', 'BufNewFile'}, {
pattern = '*.gohtml',
command = 'set filetype=html'
}
)
})
vim.api.nvim_create_autocmd({'BufRead', 'BufNewFile'}, {
pattern = {'*.man', '*.kbom'},
command = 'set filetype=xml'
}
)
})
vim.api.nvim_create_autocmd({'BufRead', 'BufNewFile'}, {
pattern = '*.w',
command = 'set filetype=cpp'
}
)
})
vim.api.nvim_create_autocmd({'FocusGained', 'BufEnter', 'CursorHold'}, {
pattern = '*',
command = 'checktime'
})

View File

@ -8,7 +8,9 @@ vim.g.mapleader = ' '
vim.g.editorconfig = false
-- options
vim.opt.autoread = true
vim.opt.autowrite = true
vim.opt.clipboard = 'unnamedplus'
vim.opt.completeopt = 'menuone,noselect'
vim.opt.expandtab = true
vim.opt.fileformats = 'unix,dos,mac'
@ -30,7 +32,6 @@ vim.opt.spell = false
vim.opt.swapfile = false
vim.opt.tabstop = 4
vim.opt.termguicolors = true
vim.opt.clipboard = 'unnamedplus'
vim.opt.updatetime = 300
vim.opt.wrap = false
vim.opt.writebackup = false