From abe99bfe74ecb928e36166a69207460f562f12fd Mon Sep 17 00:00:00 2001 From: Kai Hoewelmeyer Date: Sun, 10 Sep 2023 19:34:58 +0200 Subject: [PATCH] feat(nvim): detect outdated file when attempting to change them Fixes #641 --- nvim/config--nvim--init.vim.symlink | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nvim/config--nvim--init.vim.symlink b/nvim/config--nvim--init.vim.symlink index 8df4c87104..81bc9c7fbf 100644 --- a/nvim/config--nvim--init.vim.symlink +++ b/nvim/config--nvim--init.vim.symlink @@ -92,6 +92,14 @@ endif set completeopt=menu,menuone,noselect set shortmess+=c + +" Ensure that out-of-date disk images are detected when attempting changes, +" and not when trying to write changes. +augroup checkbeforewrite + autocmd! + autocmd InsertEnter * checktime +augroup end + "}}} "{{{ plugins