I'm wrapping a command line script in a function and then in a command, which supplies this script with 2 arguments:
nnoremap <leader>G :BxSedRi 'src/', 's/\<<C-r><C-w>\>
fun! BxSedRi(Dir,Arg)
:if len(getbufinfo({'bufmodified': 1}))
:throw "Must not have modified buffers"
:endif
:execute ":silent! !sed_Ri@bx" shellescape(a:Dir) shellescape(a:Arg)
:bufdo! e!
:redraw!
endfun
command! -nargs=+ BxSedRi call BxSedRi(<args>)
After the script, I was hoping for :bufdo! e!
and :redraw!
to silently reload all my buffers as the underlying files might have been changed by the script.
However, I am still getting these prompts:
W11: Warning: File "..." has changed since editing started │
See ":help W11" for more info. │
[O]K, (L)oad File:
How can I get rid them and just reload all buffers silently?