Reputation: 2440
When I create a file called hello.txt
in C:\Windows\System32
with the text "hello" in it, gVim
for some reason will not find this file. Can someone explain why this happens?
Here you can see I created the file in Notepad
.
Now I'm trying to find the same file in gVim
using :E
. hello.txt
is nowhere to be found. :e hello.txt
opens up a new file. I feel like I'm getting trolled by my computer.
Upvotes: 1
Views: 475
Reputation: 8905
If you're using a 32-bit Vim (both Bram's installer and the "Vim without Cream" installer often recommended are 32-bit) on a 64-bit Windows, then you've fallen victim to the WOW64 redirection in Windows. Since 32-bit applications are not compatible with 64-bit libraries, C:\Windows\System32
when accessed from a 32-bit application actually gives you the content of C:\Windows\SysWOW64
.
But don't despair, you can actually access the C:\Windows\System32
on most 64-bit systems from within Vim, you just need to use the special path C:\Windows\Sysnative
(which only seems accessible by 32-bit applications and maps to the 64-bit C:\Windows\System32
directory).
Upvotes: 7