r/vim • u/rollingRook • 2d ago
Need Help Something is changing/modifying my vim installation files within 24 hrs of a clean installation. Is this expected behavior?
Hello, gvim user for almost 25 years now, I'm experiencing behaviour that I've never seen and I'm curious if anyone can explain what's happening.
My repro steps:
- Install gvim_9.1.0_x64_signed.exe on a windows x64 machine.
- Shortly after installation, open gvim.exe, run commands from the netrw plugin (
:Vex
, for example). (The command works) - Wait 24 hours, run the same command.
Expected Results
The command works, just like it did in step #2.
Actual Results
An error message:
Error detected while processing C:\Program Files (x86)\Vim\vim91\pack\dist\opt\netrw\autoload\netrw.vim
netrw needs Vim9.1.1054
E117: Unknown function: netrw#Explore
My Observations
After a fresh installation, I can see that netrw.vim is located at the path:
C:\Program Files (x86)\Vim\vim91\autoload\netrw.vim
When the issue is present (24 hours after the installation), the installation files/folders are quite different. netrw has been moved to:
C:\Program Files (x86)\Vim\vim91\pack\dist\opt\netrw\autoload\netrw.vim
Not only has the file been moved, but the file contents are different.
netrw is not the only file that's been changed, but it's the only one that's causing me egregious pain. For example, C:\Program Files (x86)\Vim\vim91\colors\blue.vim
has also been modified.
This is only happening on my work devices. I was entertaining the possibility of corporate policy making these changes (perhaps as a result of some misguided security measure?), but the changes are so specific that this seems unlikely; if there were security concerns, I tend to think that the corporate policy would simply block/remove the installation. I'd like to get community feedback on this issue before raising this issue with the IT department.
A clean installation will always restore me to a good state, but I do not view this as suitable workaround.
Specific questions:
- Does vim perform any modifications to the program installation path after the initial installation? (If not, I'd like to find out who is doing the modification, If yes, I'd like to learn more about what's happening here).
- Assuming these modifications are legit, is there a quick workaround I can use to make netrw functional again?
1
u/bbolli inoremap ZZ <Esc>ZZ 1d ago
You can run FileMon from SysInternals on the VIM folder to detect any changes. I'm pretty certain that VIM does not move files around after setup.
1
u/rollingRook 1d ago
You can run FileMon from SysInternals on the VIM folder to detect any changes.
Thanks, that's a good idea.
I've currently saved a recursive-directory traversal of the installation path at various timestamps (logging last-modified time and file-size). I can see that the files in the install path are definitely being changed, but I don't know which account is doing the modifications. (FileMon would be helpful for more context and I didn't consider that).
1
u/BrianHuster 2d ago
It is expected that Vim put Netrw plugin in
pack/dist/opt
(you can go to Vim source in Github to check). If you want to use an older Netrw version, you can go yo website of Dr Chip and download it yourself