Comments (2)
I read the source code and figure out the reason.
function! s:Autosave(timed)
if index(g:workspace_autosave_ignore, &filetype) != -1 || &readonly || mode() == 'c' || pumvisible()
return
endif
let current_time = localtime()
let s:last_update = get(s:, 'last_update', 0)
let s:time_delta = current_time - s:last_update
if a:timed == 0 || s:time_delta >= 1
let s:last_update = current_time
checktime " checktime with autoread will sync files on a last-writer-wins basis.
call s:UntrailSpaces()
call s:UntrailTabs()
silent! doautocmd BufWritePre % " needed for soft checks
silent! update " only updates if there are changes to the file.
if a:timed == 0 || s:time_delta >= g:workspace_autosave_au_updatetime
silent! doautocmd BufWritePost % " Periodically trigger BufWritePost.
endif
endif
endfunction
That is why we can't redo, because the file changed.
call s:UntrailSpaces()
call s:UntrailTabs()
Could we just autosave it and not to do this behavior?
from vim-workspace.
let g:workspace_autosave = 1
let g:workspace_autosave_untrailspaces = 0
let g:workspace_autosave_untrailtabs = 0
That works for me. But I think we can remind users in the readme
from vim-workspace.
Related Issues (20)
- let g:workspace_create_new_tabs = 0 not work properly
- Restoring unnamed buffers
- Opening previous session results in blank buffers
- Fail to create session storage directory on MS Windows (bugfix provided)
- Closing vim without closing the open files HOT 2
- Extra empty undo action HOT 2
- Check if session is already in use
- No way to load session if already in vim?
- Work Space not loading up on nvim v0.4.4
- Autosave error in telescope
- When Neovim (maybe Vim) has this plugin losts getcwd
- Is it possible to switch workspaces with fzf?
- Is it possible to list all sessions?
- Is it possible to disable autosave on idle
- NERD tree seems to cause issues HOT 4
- options lost when saving existing workspace
- Popup windows break workspace
- Diff mode doesn't work as expected with existing workspace
- Errors at Neovim start HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-workspace.