Loads of changes
This commit is contained in:
@@ -12,4 +12,24 @@ vim.api.nvim_create_autocmd('TextYankPost', {
|
||||
end,
|
||||
})
|
||||
|
||||
local autosave_group = vim.api.nvim_create_augroup('autosaving', { clear = true })
|
||||
|
||||
vim.api.nvim_create_autocmd('FocusLost', {
|
||||
group = autosave_group,
|
||||
pattern = '*',
|
||||
command = 'silent! wa', -- Save all files when moving away from the window
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('InsertLeave', {
|
||||
group = autosave_group,
|
||||
pattern = '*',
|
||||
command = 'silent! wa', -- Save all files when leaving insert mode
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('TextChanged', {
|
||||
group = autosave_group,
|
||||
pattern = '*',
|
||||
command = 'silent! wa', -- Save all files when text is changed
|
||||
})
|
||||
|
||||
require('helpers').edit_cf('a', '/lua/autocmd.lua')
|
||||
|
||||
Reference in New Issue
Block a user