-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"E325: ATTENTION" does not appear when a swapfile exists #672
Comments
Related to #638. The It's possible to manually recover the existing swapfile with |
If this is left as the default, I'd at least strongly request that it be documented somewhere prominent in the README, if not print a warning upon install/upgrade; I myself finally got to the point where I grepped my entire |
For those who want to avoid this problem, and who don't mind running an older version of vim-polyglot from October 2020:
|
Really though - this functionality is really annoying and should be at least documented, or even better, removed. If one doesn't like swap file warnings they can edit their own vimrc - that's what the file is there for. |
I am not sure what is the relation to The problem is here in init.py from autoload introduced in commit 05b8bbc and seems to come from #613. The comment is:
but seems to ignore that the swapfile warning is used in many other contexts. If polyglot is starting to go around changing random global settings this is sure to cause problems; what one person thinks is no big deal, another will find disastrous. In no way should polyglot be changing global settings like this, which break core vim assumptions. It's for syntax highlighting. This commit brazenly changes |
ok, now I see that the new shortmess setting is protected under
trying this in polyglot_is_disabled did not work for me because it was getting overwritten later in my config. I can confirm it does work when disabling it correctly. I suppose that makes it better but this is certainly surprising and I don't think it should be the default. It's written in the main project README that it uses vim-sensible, but that never caused issues before and I wouldn't dream it would be messing with these kinds of settings (I don't see anything with I did overwrite files which had other editing sessions because of this, which is what led me here. I do rely on vim to tell me if a file edit is actually open somewhere else. I imagine many people do. I also think people wouldn't necessarily want to disable all of |
this thing disabled "file is already open" messages in a syntax highlighting bundle, amazing see sheerun/vim-polyglot#672
I found this issue when I Why is "sensible" even part of this plugin, let alone enabled by default? Setting things like I appreciate the time and effort put into assembling so many filetype plugins into a single collection. However, these inclusions are unnecessary bloat at best, and at worst duplicate and possibly conflict with user settings and/or the plugins being emulated here. Please consider removing them, or at the very least leave them disabled by default. This is frankly a very puzzling and out-of-place addition with surprising behavior. [EDIT] |
|
It's automatically removed when vim closes, unless someone exited vim in crashing fashion, like closing terminal window instead of exiting Vim first. In this case swapfiles being left on the disk is proper behavior to prevent potential losses.
If they want to recover something, they will for sure google for "vim recover file" which explains this command. |
Sorry, I'll have to retract that part; I misread my grep output and conflated some unrelated
The "Attention" prompt would only be shown in windows with modified buffers, which I think is a reasonable warning; unmodified ones would still reload without the prompt. I see the value in disabling the message and just using |
All buffers can be modified e.g. when you checkout a commit, then you need to manually "unblock" all instances by confirming ATTENTION message in each of the windows individually |
https://github.com/chrisbra/Recover.vim handles this case without disrupting normal swapfile usage. Adding |
this issue is, in `vim-polyglot/autoload/polyglot/init.vim`: ```vim if !has_key(g:polyglot_is_disabled, 'sensible') " ... " This is needed to avoid swapfile warning when auto-reloading set shortmess+=A " ... endif ``` see <sheerun/vim-polyglot#672>. this happens upon sourcing the file. I could figure out a way to prevent this, but this patch works for now.
Does this bug happen when you install plugin without vim-polyglot?
Not applicable because the problem is with vim-polyglot itself (
ftdetect/polyglot.vim
).Describe the bug:
When opening a file that has a swapfile,
E325: ATTENTION
will not be shown.This bug was introduced in v4.16.0 in commit 739102e.
To Reproduce:
set swapfile
to your Vim configuration file.test.py
) and save it. Do not close Vim.Observation:
E325: ATTENTION
does not appear in step (3).Expected behavior:
E325: ATTENTION
appears.Please make this behavior optional.
The text was updated successfully, but these errors were encountered: