summaryrefslogtreecommitdiff
path: root/libre/vim/parabola.vim
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2018-05-14 18:33:59 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2018-05-14 18:33:59 -0500
commit747fa154836104aa7ba80b4ab20613c22b5ee7d4 (patch)
tree6fa1df0e9105f95e8a34fc6e87f1f635b4c52fde /libre/vim/parabola.vim
parent43e6b85cd90c1df8665774cf17ea7756f220c59f (diff)
downloadabslibre-747fa154836104aa7ba80b4ab20613c22b5ee7d4.tar.gz
abslibre-747fa154836104aa7ba80b4ab20613c22b5ee7d4.tar.bz2
abslibre-747fa154836104aa7ba80b4ab20613c22b5ee7d4.zip
vim-8.0.1838-1.parabola1: updating version
Diffstat (limited to 'libre/vim/parabola.vim')
-rw-r--r--libre/vim/parabola.vim12
1 files changed, 9 insertions, 3 deletions
diff --git a/libre/vim/parabola.vim b/libre/vim/parabola.vim
index 45424d969..f7e5bbf82 100644
--- a/libre/vim/parabola.vim
+++ b/libre/vim/parabola.vim
@@ -17,10 +17,16 @@ set ruler " show the cursor position all the time
set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc,.png,.jpg
" Move the swap file location to protect against CVE-2017-1000382
-if ! isdirectory('~/.vim/swap/')
- silent! call system('install -dm 700 ~/.vim/swap')
+if exists('$XDG_CACHE_HOME')
+ let &g:directory=$XDG_CACHE_HOME
+else
+ let &g:directory=$HOME . '/.cache'
+endif
+let &g:directory.='/vim/swap//'
+" Create swap directory if it doesn't exist
+if ! isdirectory(expand(&g:directory))
+ silent! call mkdir(expand(&g:directory), 'p', 0700)
endif
-set directory=~/.vim/swap/
if has('gui_running')
" Make shift-insert work like in Xterm