Skip to content
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

Opening the same file twice does not lead to the common warning message #834

Open
DavidCdeB opened this issue Apr 20, 2023 · 1 comment
Open

Comments

@DavidCdeB
Copy link

Does this bug happen when you install plugin without vim-polyglot?
The bug disappears when vim-polyglot is disabled. The bug appears when vim-polyglot is enabled.

Describe the bug:

On the latest stable version of vim, vim 9.0.1420, if one creates a text file, opens it, and then opens the same file through another terminal window, the warning message related to .swp files does not pop up. This message was previously displayed before the update and helped prevent editing an already opened file.

To Reproduce:

Open 1st terminal window
$ vim -u NONE test.txt
:wq!

Open 2nd terminal window in the same directory:
$ vim -u NONE test.txt

I see the warning message:

Swap file "~/.cache/vim/swap/...../text.txt.swp" already exists!

Open ~/.vimrc and check you invoke the plugin through:
"Plug 'sheerun/vim-polyglot'

Open 1st terminal window
$ vim test.txt
:wq!

Open 2nd terminal window in the same directory:
$ vim test.txt

The swp warning message does not appear.

Make a security copy of vimrc:
$ cd ~/
$ cp .vimrc .vimrc_security

Open ~/.vimrc and just comment out this line:
"Plug 'sheerun/vim-polyglot'

The swp warning message then does appear.

@plurry
Copy link

plurry commented Feb 26, 2024

I think this is the same bug as #672 and #638 and you can fix it with let g:polyglot_disabled = ['sensible'] like recommended in those issues. It's also mentioned in the README but easily missed.

I don't know the intricacies but I don't think the "sensible" stuff should be a syntax highlighting plugin's business.

The bigger problem is it looks like this project is no longer actively maintained anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants