aboutsummaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorsrdusr <trevorgray@srdusr.com>2023-08-31 11:01:31 +0200
committersrdusr <trevorgray@srdusr.com>2023-08-31 11:01:31 +0200
commite4b2ba38ce816aadb067d1c76561d8fe2b23394d (patch)
treedb712d9fdccda6fa928bff272de240d8ccd1c46b /autoload
parent443b582eb00d1d3e0f6887071ceff8886ab8a83b (diff)
downloaddotfiles-e4b2ba38ce816aadb067d1c76561d8fe2b23394d.tar.gz
dotfiles-e4b2ba38ce816aadb067d1c76561d8fe2b23394d.zip
Fix to annoying timestamp issue on write (The file has been changed since reading it...)
Diffstat (limited to 'autoload')
-rw-r--r--autoload/utils.vim13
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()
+
+
+"-------------------------------------------------