-- Start Git commit in insert mode vim.api.nvim_create_augroup("bufcheck", { clear = true }) vim.api.nvim_create_autocmd("FileType", { group = "bufcheck", pattern = { "gitcommit", "gitrebase" }, command = "startinsert | 1", }) -- Write buffers every 5 seconds local function write_buf_timer() vim.fn.timer_start(5000, function() vim.api.nvim_command('wall') end) end vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = write_buf_timer })