The only workaround I can come up with is after opening a vim session:
:set updatecount=0 | e +setlocal\ noswapfile FILENAME | set updatecount&
Are there any shorter vim commands or options that could achieve the same effect?
The only workaround I can come up with is after opening a vim session:
:set updatecount=0 | e +setlocal\ noswapfile FILENAME | set updatecount&
Are there any shorter vim commands or options that could achieve the same effect?
You could try :noswapfile e FILENAME:
:nos[wapfile] {command} *:nos* *:noswapfile*
Execute {command}. If it contains a command that loads a new
buffer, it will be loaded without creating a swapfile and the
'swapfile' option will be reset. If a buffer already had a
swapfile it is not removed and 'swapfile' is not reset.
But keep in mind that usually there are better solutions, depending on what you are trying to achieve, because without a swap file you are more likely to lose your work.