Using my VIM config in Windows (gVim)


Categories: ,

This continues from my last post, and is mostly a reminder to myself!

My .vimrc file, created for VIM on the RaspberryPi, is also usable on gVim in Windows. It’s the same 2 steps, fetch using Git, and make a symlink (yes you can do that on Windows too)

Open an elevated command prompt (run as administrator)

cd \users\greg
git clone vimfiles
mklink _vimrc vimfiles\.vimrc

Job done!


Older versions of Windows (such as Windows Server 2003) so not have the mklink command.
Also needed to add an environment variable $HOME

In the case of Windows Server 2003, I set up a user environment variable in System Properties -> Advanced -> Environment Variables -> User Variables
Variable: $HOME Value: %USERPROFILE%
Requires log off / login
Then create the link (it’s a hardlink rather than the softlink which mklink creates. For explanation, see overview-to-understanding-hard-links-junction-points-and-symbolic-links-in-windows )

fsutil hardlinks create _vimrc vimfiles\.vimrc