Skip to content
This repository was archived by the owner on May 29, 2023. It is now read-only.

Commit e5450e9

Browse files
committed
When autosave is enabled, pull swap functionality by default.
1 parent 27c6ac2 commit e5450e9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

plugin/workspace.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,13 @@ function! s:SetAutosave(enable)
148148
if a:enable == 1
149149
let s:autoread = &autoread
150150
let s:autowriteall = &autowriteall
151+
let s:swapfile = &swapfile
152+
let s:swapsync = &swapsync
151153
let s:updatetime = &updatetime
152154
set autoread
153155
set autowriteall
156+
set noswapfile
157+
set swapsync=""
154158
set updatetime=1000
155159
augroup WorkspaceToggle
156160
au! BufLeave,FocusLost,FocusGained,InsertLeave * call s:Autosave(0)
@@ -162,6 +166,8 @@ function! s:SetAutosave(enable)
162166
let &autoread = s:autoread
163167
let &autowriteall = s:autowriteall
164168
let &updatetime = s:updatetime
169+
let &swapfile = s:swapfile
170+
let &swapsync = s:swapsync
165171
au! WorkspaceToggle * *
166172
let s:autosave_on = 0
167173
endif

0 commit comments

Comments
 (0)