From: Jannik ZANDER Date: Sun, 22 May 2016 13:43:24 +0000 (+0200) Subject: Fix .vimrc under windows X-Git-Url: https://git.zndr.dk/?a=commitdiff_plain;h=60534883fceb8d3323fcdc404e06cfa5994eb905;p=dotfiles.git Fix .vimrc under windows --- diff --git a/.vimrc b/.vimrc index f69cd33..3d4ab1b 100644 --- a/.vimrc +++ b/.vimrc @@ -2,17 +2,17 @@ " --------------------- set nocompatible -set runtimepath+=$HOME/.config/vim -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 - -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 +set runtimepath+=~/.config/vim +set directory=~/.cache/vim/swap +set backupdir=~/.cache/vim/backup +set undodir=~/.cache/vim/undo +set viminfo+=n~/.local/share/vim/viminfo + +if empty(glob('~/.config/vim/autoload/plug.vim')) + silent !mkdir -p .cache/vim/swap > /dev/null 2>&1 + silent !mkdir -p .cache/vim/backup > /dev/null 2>&1 + silent !mkdir -p .cache/vim/undo > /dev/null 2>&1 + silent !curl -fLo .config/vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim autocmd VimEnter * PlugInstall | source $MYVIMRC endif @@ -20,7 +20,7 @@ endif " section: plugins {{{1 " --------------------- -call plug#begin('$HOME/.config/vim/plugged') +call plug#begin('~/.config/vim/plugged') "Plug 'tpope/vim-sensible' "Plug 'tpope/vim-ragtag' @@ -215,6 +215,6 @@ if (&t_Co > 2 || has("gui_running")) && has("syntax") endif " }}}1 -if filereadable(expand('$HOME/.config/vim/vimrc_local')) - source $HOME/.config/vim/vimrc_local +if filereadable(expand('~/.config/vim/vimrc_local')) + source ~/.config/vim/vimrc_local endif