From: Jannik Zander Date: Sat, 21 May 2016 06:42:20 +0000 (+0200) Subject: Simple ~/.vimrc X-Git-Url: https://git.zndr.dk/?a=commitdiff_plain;h=d71118ae471abeb4405cad6652827e296bbdb3e8;p=dotfiles.git Simple ~/.vimrc --- diff --git a/.config/vim/vimrc b/.config/vim/vimrc index 8251f49..3164868 100644 --- a/.config/vim/vimrc +++ b/.config/vim/vimrc @@ -1,4 +1,18 @@ 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 + +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 diff --git a/.vimrc b/.vimrc index 9992293..e09ede9 100644 --- a/.vimrc +++ b/.vimrc @@ -1,19 +1,3 @@ " ~/.vimrc -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 - -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 - source $HOME/.config/vim/vimrc