How do I configure Vim running under Windows to be able to edit Golang code? I have spent 3 hours trawling through incomplete, self referential guides on this subject and I grow weary with the resultant frustration.
Ok more details. I have Vim installed. The folder structure is: Program Files (x86) -> Vim vim80 autoload colors ... vimfiles
An example of my confusion is the fact that the installation guide to vim-plug, in the sections about Powershell, simply says to issue the line:
md ~\vimfiles\autoload
What are these folders relative to?
I have an existing autoload
folder but it is under the vim80
folder, hence my confusion. The aforementioned folder structure is the default one created by the Vim installer.
The ~
in powershell refers to $HOME
wnich by default means %USERPROFILE%
So ~\vimfiles\autoload
are user settings used by vim80/autoload
.
The ~ characters is your Userprofile as said by VonC.
You can therefore create the vimfiles folder under your user directories:C:\Users\username\vimfiles
These will be loaded after the core files under the vim installation location Program files(x86)\Vim\vim80
but both folders same a similar purpose.
Using the user directory is recommended if multiple users are using the same vim installation while having different plugins and a different vimrc.
Note that this also works with the vimrc file:
You can place your _vimrc
or .vimrc
in C:\Users\username\
and it will be loaded by vim.