diff --git a/plugin/settings.vim b/plugin/settings.vim index 20edaeb..50e0983 100644 --- a/plugin/settings.vim +++ b/plugin/settings.vim @@ -37,7 +37,7 @@ if &listchars ==# 'eol:$' set listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+ endif -if v:version > 703 || v:version == 703 && has("patch541") +if v:version > 703 || v:version == 703 && has('patch541') " Delete comment character when joining commented lines set formatoptions+=j endif @@ -105,6 +105,15 @@ if has('writebackup') set nowritebackup endif +" Change info file location +if has('viminfo') && has('unix') + let s:cache_dir = expand('~/.cache/vim') + if !isdirectory(s:cache_dir) + call mkdir(s:cache_dir) + endif + execute 'set viminfofile='.s:cache_dir.'/info' +endif + " Use Unix as standard file type set fileformats=unix,mac,dos