explain how to set an auto command in vim

This commit is contained in:
Uwe Steinmann 2022-11-09 19:33:26 +01:00
parent d0a4f481ba
commit cbf68b7ab6

View File

@ -87,6 +87,12 @@ set nobackup
set nowritebackup set nowritebackup
set noswapfile set noswapfile
If you want to restrict the settings to the directory where the dms
is mounted by webdav, e.g. /media/webdav, you can set an auto command
in .vimrc
autocmd BufNewFile,BufRead /media/webdav/* set nobackup nowritebackup noswapfile
Creating the backup file in a directory outside of WebDAV doesn't help in Creating the backup file in a directory outside of WebDAV doesn't help in
this case, because it still does the file renaming which is turned off by this case, because it still does the file renaming which is turned off by
'nowritebackup'. 'nowritebackup'.