[I'm not sure if this has been addressed before]
Just a quick note:
Newer versions of VIM create temporary file buffers with a trailing ~ on the file name. This file is in many cases by default readable by the web browser.
For example: If you use vi to edit index.php, a file called index.php~ will be created. If someone types index.php~ into their web-browser, they will see your source code!!! These files are not automatically deleted by VIM.
How to Fix this:
The easiest way to fix this is to have Apache send *.php~ files to the PHP parser. You can do this by adding the following line to the .htaccess file in your root directory. (If you don't have an .htaccess file in that directory, just create one and add this line)
AddType application/x-httpd-php .php .php~
Note: You may wish to add other extensions such as .html depending on how your site is set up.
Hope this helps.
*