diff options
| author | srdusr <trevorgray@srdusr.com> | 2023-08-31 11:01:31 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2023-08-31 11:01:31 +0200 |
| commit | e4b2ba38ce816aadb067d1c76561d8fe2b23394d (patch) | |
| tree | db712d9fdccda6fa928bff272de240d8ccd1c46b | |
| parent | 443b582eb00d1d3e0f6887071ceff8886ab8a83b (diff) | |
| download | dotfiles-e4b2ba38ce816aadb067d1c76561d8fe2b23394d.tar.gz dotfiles-e4b2ba38ce816aadb067d1c76561d8fe2b23394d.zip | |
Fix to annoying timestamp issue on write (The file has been changed since reading it...)
| -rw-r--r-- | autoload/utils.vim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/autoload/utils.vim b/autoload/utils.vim index fc078f7..3bb83bf 100644 --- a/autoload/utils.vim +++ b/autoload/utils.vim @@ -164,3 +164,16 @@ autocmd! BufNewFile,BufRead *.* call utils#DisableBr() "------------------------------------------------- + +" Annoying timestamp issue on write (The file has been changed since reading it...) +function! utils#ProcessFileChangedShell() + if v:fcs_reason == 'mode' || v:fcs_reason == 'time' + let v:fcs_choice = '' + else + let v:fcs_choice = 'ask' + endif +endfunction +autocmd FileChangedShell <buffer> call utils#ProcessFileChangedShell() + + +"------------------------------------------------- |
