-
-
Notifications
You must be signed in to change notification settings - Fork 278
Commit
Closes #22.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,15 +60,16 @@ if &history < 1000 | |
endif | ||
set viminfo^=! | ||
|
||
if isdirectory(expand('~/.cache/vim')) | ||
let s:dir = has('win32') ? '~/Application Data/Vim' : has('mac') ? '~/Library/Vim' : '~/.local/share/vim' | ||
if isdirectory(expand(s:dir)) | ||
if &directory =~# '^\.,' | ||
set directory^=~/.cache/vim/swap// | ||
let &directory = s:dir . '/swap//,' | ||
endif | ||
if &backupdir =~# '^\.,' | ||
set backupdir^=~/.cache/vim/backup// | ||
let &backupdir = s:dir . '/backup//,' | ||
endif | ||
if exists('+undodir') && &undodir =~# '^\.\%(,\|$\)' | ||
set undodir^=~/.cache/vim/undo// | ||
let &undodir = s:dir . '/undo//,' | ||
endif | ||
endif | ||
if exists('+undofile') | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
tpope
Author
Owner
|
||
|
5 comments
on commit 6c1ed9b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My vim installation began to create undo files in project directory. Do I need to create ~/Library/Vim manually again?
Last time I needed to create ~/.cache/vim/undo directory for this feature to work properly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was the reason to move the transient files from ~/.cache
to ~/.local/share/vim
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@teranex thanks
Are you sure you want to enable this feature if the only existent undodir is
.
?Maybe move it into
if isdirectory(expand(s:dir))
statement.