diff options
| author | Thibaut Horel <thibaut.horel@gmail.com> | 2013-03-05 10:47:07 +0100 |
|---|---|---|
| committer | Thibaut Horel <thibaut.horel@gmail.com> | 2013-03-05 10:47:07 +0100 |
| commit | 72df2895ee966c1a28461bb16da49ffa365033e6 (patch) | |
| tree | 3c087c980279cc48f611dc83936d54aeb74ab239 | |
| parent | bc020558ce960e693abdccd8bf266dd54477b515 (diff) | |
| download | dotfiles-72df2895ee966c1a28461bb16da49ffa365033e6.tar.gz | |
[Vim] vim auto-generated files handling
| -rw-r--r-- | .vimrc | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -48,6 +48,25 @@ set incsearch set showmatch set hlsearch +set backup +set noswapfile + +" backups +set undodir=~/.vim/tmp/undo// +set backupdir=~/.vim/tmp/backup// +set directory=~/.vim/tmp/swap// + +" Make those folders automatically if they don't already exist. +if !isdirectory(expand(&undodir)) + call mkdir(expand(&undodir), "p") +endif +if !isdirectory(expand(&backupdir)) + call mkdir(expand(&backupdir), "p") +endif +if !isdirectory(expand(&directory)) + call mkdir(expand(&directory), "p") +endif + let mapleader = "," nnoremap <leader><space> :noh<cr> nnoremap <tab> % |
