I like
Vi, but I hate the fact that it saves these really annoying backup files when I'm working. For example, if I'm working on "index.php", once I
:w the file (that's save the file for non-Vi users), it will also spit out "index.php~". According to Vim documentation, the file with a tilde on the end of it is supposed to be a backup copy of the previous revision before the save. I suppose this is a nice feature, but I don't use Vim enough (anymore) to take advantage of it. The files with the tilde's on the end of them get plain annoying after a while.
The solution is to
:set nobk in your Vim session. Or, if you don't want to
:set nobk for every new session (like me), you can edit your .vimrc/.gvimrc files. Continue reading where to find your .vimrc and .gvimrc files on Vista and Linux.
On Linux, your .gvimrc and .vimrc files can be found in your home directory:
#/> ll ~ -a | grep vim | grep rc
-rw-rw-r-- 1 mark mark 22 2008-04-08 09:18 .gvimrc
-rw-rw-r-- 1 mark mark 22 2008-04-08 09:19 .vimrcOn Vista/XP, assuming you have the
Windows version of Vim installed, you can find the _vimrc config file at
C:\Program Files\Vim\_vimrc.
Add "
set nobk" to your Vim configuration file as shown below. Enjoy.

Did you find this post helpful, or at least, interesting?