Nithin's answer worked for me, although my vimrc file is in the path C:\Program Files (x84)\Git\bin\vim instead of ..\share\vim .
I need to highlight Java syntax, so I copied java.vim from /usr/share/vim/vim70/syntax/java.vim from my Linux server. It turned out that java.vim using html.vim (no problem, I copied html.vim ).
To work on windows in java.vim you need to change the following line:
syntax include @javaHtml <sfile>:p:h/html.vim
to
syntax include @javaHtml <sfile>:p:h\html.vim
I also found out that \share\vim\vimrc pretty much has all the important settings for programmers, including:
set syntax = on
set background = dark
set ai
I hope this helps anyone who has the same problem.
source share