When I'm in a modified buffer and try to open a file using
:e otherFile I get
E37: No write since last change (add ! to override)
Since this happens fairly often, I'd like to automatically save the current file before opening the new one.
That's why I added this to my
autocmd BufLeave * silent! wall
But this autocommand doesn't help when using
Using Neovim v0.4.3
:set autowriteallin an answer?
:h 'autowriteall', then try both (make sure only one of them is set), you should see the difference immediately, won't cost more 15 mins.
autowriteallalternatingly but couldn't tell the difference in behavior. In both cases the buffer that I was leaving was saved.
'hidden'won't work if