aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2014-04-30 20:58:52 -0400
committerTeddy Wing2014-04-30 20:58:52 -0400
commit4a50822e293974fc86d3c668cfc5da5c348e7b1e (patch)
tree787e1b7571f41323192a7e53d4c97d7387c8757c
parent77c59f64e3022c82614293c6c46b0f681f59b4d1 (diff)
downloaddotvim-4a50822e293974fc86d3c668cfc5da5c348e7b1e.tar.bz2
vimrc: store backup/swap files in ~/.vim
Instead of dropping .swp etc. files all over the filesystem, put them in the `~/.vim/backup/` directory. Here we have three directories, one for each of backups, swap, and undo.
-rw-r--r--vimrc10
1 files changed, 10 insertions, 0 deletions
diff --git a/vimrc b/vimrc
index 8614fd5..7807541 100644
--- a/vimrc
+++ b/vimrc
@@ -90,6 +90,10 @@
" * Add autocmd to set .json files to use JavaScript syntax highlighting
" and have a json filetype
"
+" 2014.04.30:
+" * Set backupdir, directory, and undodir to be within ~/.vim so that my
+" filesystem doesn't clutter with *.swp files and the like
+"
" Pathogen
@@ -138,6 +142,12 @@ set grepprg=ack " Use ack instead of grep
set ignorecase " Case insensitive
set smartcase " Case insensitive unless an uppercase character is entered
+" Store swap files in .vim/ directory
+" http://stackoverflow.com/a/15317146
+set backupdir=~/.vim/backup/backup//
+set directory=~/.vim/backup/swap//
+set undodir=~/.vim/backup/undo//
+
set laststatus=2 " Always show the status line
" Statusline