mirror of
https://github.com/tpope/vim-sensible.git
synced 2025-11-12 13:03:47 -05:00
Fix transient directory options
This commit is contained in:
@@ -63,13 +63,13 @@ set viminfo^=!
|
|||||||
let s:dir = has('win32') ? '~/Application Data/Vim' : has('mac') ? '~/Library/Vim' : '~/.local/share/vim'
|
let s:dir = has('win32') ? '~/Application Data/Vim' : has('mac') ? '~/Library/Vim' : '~/.local/share/vim'
|
||||||
if isdirectory(expand(s:dir))
|
if isdirectory(expand(s:dir))
|
||||||
if &directory =~# '^\.,'
|
if &directory =~# '^\.,'
|
||||||
let &directory = s:dir . '/swap//,'
|
let &directory = s:dir . '/swap//,' . &directory
|
||||||
endif
|
endif
|
||||||
if &backupdir =~# '^\.,'
|
if &backupdir =~# '^\.,'
|
||||||
let &backupdir = s:dir . '/backup//,'
|
let &backupdir = s:dir . '/backup//,' . &backupdir
|
||||||
endif
|
endif
|
||||||
if exists('+undodir') && &undodir =~# '^\.\%(,\|$\)'
|
if exists('+undodir') && &undodir =~# '^\.\%(,\|$\)'
|
||||||
let &undodir = s:dir . '/undo//,'
|
let &undodir = s:dir . '/undo//,' . &undodir
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
if exists('+undofile')
|
if exists('+undofile')
|
||||||
|
|||||||
Reference in New Issue
Block a user