Getting organized: ~ and .swp files

January 4, 2007 at 2:30 am Leave a comment

SOne of my biggest with most text editors is all the temp files they leave lying around. I love them when I need them, but when I don’t they’re just plain annoying and clutter. Since I’m trying to work on organization this year I decided to find some way to still keep them (the’ve saved my neck many times before 😉 ) but keep them better organized. With VIM (and other editors too I’m sure) you can control where all these files go by using

set backupdir=./.backup,.,/tmp
set directory=.,./.backup,/tmp

backupdir is the place to put all the ~ backup files and directory is the variable for the .swp files. You can also see
:help backupdir and :help directory for more info.

Now I can put all those ~ and swp files in a hidden .backup directory and forget about them until I need them. Now if only there was a way to globally configure all editors to respect this option…

This tip and others can be found on the VIM Tips page.

Entry filed under: Linux. Tags: , , , , , .

New SINP Logo Synaptics TouchPad

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


%d bloggers like this: