When I :q vim on my debian root account (not even writing), it always displays an error message:
E138: Can't write viminfo file $HOME/.viminfo!
.viminfo didn't exist, so I created it and checked the permissions of
/root and the file, but they were fine:
drwx------ 3 root root 4.0K Sep 16 11:13 . -rw-r--r-- 1 root root 0 Sep 16 11:13 /root/.viminfo
$HOME exists as an environment variable:
~ # echo $HOME /root
:!echo $HOME returns empty output. How can I get rid off this error, why isn't vim accepting $HOME?