Skip to content

Commit

Permalink
Fix transient directory options
Browse files Browse the repository at this point in the history
  • Loading branch information
tpope committed Jan 21, 2013
1 parent 6c1ed9b commit a2cd959
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugin/sensible.vim
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ set viminfo^=!
let s:dir = has('win32') ? '~/Application Data/Vim' : has('mac') ? '~/Library/Vim' : '~/.local/share/vim'
if isdirectory(expand(s:dir))
if &directory =~# '^\.,'
let &directory = s:dir . '/swap//,'
let &directory = s:dir . '/swap//,' . &directory
endif
if &backupdir =~# '^\.,'
let &backupdir = s:dir . '/backup//,'
let &backupdir = s:dir . '/backup//,' . &backupdir
endif
if exists('+undodir') && &undodir =~# '^\.\%(,\|$\)'
let &undodir = s:dir . '/undo//,'
let &undodir = s:dir . '/undo//,' . &undodir
endif
endif
if exists('+undofile')
Expand Down

0 comments on commit a2cd959

Please sign in to comment.