Sudoedit is nice, and it doesn't suffer from this problem. The problem (part of it anyway) is that the people who edit /etc/fstab (say) with vim have probably been using Linux for a while and, out of habit, say 'sudo vi /etc/fstab'. Suggesting the use of sudoedit is fine, but it doesn't solve this problem, because the problem isn't just that .viminfo gets nasty permissions - the problem is that when it does, vim features fail quietly and it's not always easy to figure out why. You don't get permission denied errors on .viminfo (if you did, I would consider that an adequate solution). Things just don't work.
-- Some programs create root-owned files in user $HOME when run under sudo https://launchpad.net/bugs/58002 -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs