Reputation: 1244
When I try to use :syntax on
I get the following error:
E484: Can't open file C:\Program Files (x86)\Vim\vim82\gvim.exe\syntax\snytax.vim
When I explore the directory, I find that there is a syntax.vim at the directory:
C:\Program Files (x86)\Vim\vim82\syntax\syntax.vim
How do I get gVim to recognize that this is where it should look for the syntax files?
I am using windows 10.
Upvotes: 1
Views: 397
Reputation: 11
I had the same problem.
You have to set $VIMRUNTIME (Not this variable, as Stun Brick points out in the comment below.) as an environment variable.
If you are using Windows 10, search on your compuer, "Edit the system environment variables" and you can set it.
Upvotes: 1
Reputation: 1244
User Tomoki helped me find the answer.
In windows 10, type environment variables
in the search bar
click Edit the system environment variables
Under the Advanced
tab, click Environment variables
Under the System variables
section, find the vim
or Vim
system variable, and edit the Variable value
so that it says C:\Program Files (x86)\Vim\vim82\gvim.exe
it should not have been pointing at the executable in the first place, which is why it could not find a syntax at C:\Program Files (x86)\Vim\vim82\gvim.exe\syntax\snytax.vim
Upvotes: 0