907th/vim-auto-save

Don't attempt to save files with No file name

cheecheeo opened this issue · 2 comments

With this plugin installed if you simply open vim and type, auto-save will attempt to save the buffer even though attempting this will result in an error, and in my case a prompt to continue. It'd be nice if there was an option to disable attempted saves to files with no name.

Error detected while processing CursorHold Auto commands for "*":
E32: No file name
Press ENTER or type command to continue
907th commented

@cheecheeo Hi! That is strange because we use silent! wa command which do not produce errors/messages on save. Which vim --version do you use? Could you please try to :silent! wa manually on new file?

Whoops.

I realized this is due to the following in my vimrc:

augroup syntastic
    autocmd CursorHold * nested update
augroup END

I'll have to modify that to be more intelligent about running that code properly.

Thanks for your help! 😄