]> git.zndr.dk Git - dotfiles.git/commitdiff
Remove empty vim folders
authorJannik Zander <jannikz@gmail.com>
Sat, 21 May 2016 06:05:34 +0000 (08:05 +0200)
committerJannik Zander <jannikz@gmail.com>
Sat, 21 May 2016 06:05:34 +0000 (08:05 +0200)
.cache/vim/backup/README.md [deleted file]
.cache/vim/swap/README.md [deleted file]
.cache/vim/undo/README.md [deleted file]
.vimrc

diff --git a/.cache/vim/backup/README.md b/.cache/vim/backup/README.md
deleted file mode 100644 (file)
index 77b7d2e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-# Just an empty folder for vim backup files
diff --git a/.cache/vim/swap/README.md b/.cache/vim/swap/README.md
deleted file mode 100644 (file)
index c5e7c56..0000000
+++ /dev/null
@@ -1 +0,0 @@
-# Just an empty folder for vim swap files
diff --git a/.cache/vim/undo/README.md b/.cache/vim/undo/README.md
deleted file mode 100644 (file)
index f10015a..0000000
+++ /dev/null
@@ -1 +0,0 @@
-# Just an empty folder for vim undo files
diff --git a/.vimrc b/.vimrc
index 93b117f819e6481b66437db7071d73e4ed68015d..1f1f4083f22046f679d1738e5da85c8419a45957 100644 (file)
--- a/.vimrc
+++ b/.vimrc
@@ -1,20 +1,22 @@
 " ~/.vimrc
 " Section: Environment {{{1
 
-set nocompatible
 set directory=$HOME/.cache/vim/swap
 set backupdir=$HOME/.cache/vim/backup
 set undodir=$HOME/.cache/vim/undo
 set viminfo+=n$HOME/.local/share/vim/viminfo
 "set rtp=~/$HOME/.config/vim,~/$HOME/.config/vim/after,$VIM,$VIMRUNTIME
 
+set nocompatible
 if empty(glob('$HOME/.config/vim/autoload/plug.vim'))
+  silent !mkdir -p $HOME/.cache/vim/swap > /dev/null 2>&1
+  silent !mkdir -p $HOME/.cache/vim/backup > /dev/null 2>&1
+  silent !mkdir -p $HOME/.cache/vim/undo > /dev/null 2>&1
   silent !curl -fLo $HOME/.config/vim/autoload/plug.vim --create-dirs
     \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
   autocmd VimEnter * PlugInstall | source $MYVIMRC
 endif
 
-
 if filereadable(expand('$HOME/.config/vim/autoload/plug.vim'))
 source $HOME/.config/vim/autoload/plug.vim
 call plug#begin('$HOME/.config/vim/plugged')