I often lose track of my vim sessions and try to re-open a file. This results in an annoying error dialog (which I reflexively dismiss) and kicks off a hunt for that pre-existing vim session.
A coworker pointed out how silly this was, and suggested that vim should simply auto-raise the existing window. As I have discovered, vim ships with the “edit existing” macro which does just that. I’ve added this to my vimrc:
source $VIMRUNTIME/macros/editexisting.vim
Also, I’m pretty sick and tired of .swp and ~ files cluttering up my directories. Now I use the following two commands to keep them off to the side:
set backupdir=$TEMP//
set directory=$TEMP//

Mark, great tips. BTW, if you haven’t come across this, it helped me a bit: If you like some of the prepackaged color schemes, you can get them to come up by default by adding “colo ” to your _vimrc. I like the pablo scheme so i added “colo pablo” to my _vimrc.
Cheers,
Ben
Hi Ben. I use the pablo scheme too! Oddly, it looks different on Windows vs Linux.