I want to write to a file in the home directory, so I tried the following command:
:call writefile(["foo"], "~/event.log", "a")
But I got an error:
E482: Can't create file ~/event.log
I am pretty sure that I have write permission for my home directory (of course), and there is not a file with the same name at the specified path.
If I change the destination path to the current path, it works.
Does anyone know what the problem is?