Skip to content
James Cuzella edited this page Aug 4, 2023 · 79 revisions

Notice of Wiki-edit-based Malware Campaign

Warning

This public Wiki page has been recently subjected to automated bot edits & a malware distribution campaign. As such, please check and verify all URLs before use. This especially includes URLs linking to installers for tools such as: Git, Curl, Chocolatey, gVim, etc...

Requirements

  1. Git
  2. Curl

Git on Windows

You can install Git and curl yourself or you can use the Chocolatey instructions below.

  1. Download the Git for Windows installer
  2. Run the downloaded installer and follow the instructions It's important to configure PATH environment variable properly. That's why it's recommended to select Run git from Windows command prompt option, as shown: add git to PATH

After installation try running git --version within command prompt (press Win-R, type cmd, press Enter) to make sure all good:

C:\> git --version
git version 2.12.2.windows.2

If you have recently installed Gvim on a Windows 10 machine, you can typically skip ahead..

Curl on Windows

Curl is no longer installed with the Git for Windows installer. However, Windows 10 now ships with Curl

For older versions of windows, you can download it from the cURL downloads page.

Before it can be used with Vundle it's required make curl run in command prompt.

Extract the download and then make sure that you add the installed location to the PATH. A typical installation would be to extract the downloaded file and move the directory to C:\Program Files\curl. Then you can add C:\Program Files\curl\bin to the PATH

C:\> curl --version
curl 7.53.1 (x86_64-pc-win32) libcurl/7.53.1 OpenSSL/1.1.0e zlib/1.2.11 WinIDN libssh2/1.8.0 nghttp2/1.21.0
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile SSPI Kerberos SPNEGO NTLM SSL libz TLS-SRP HTTP2 HTTPS-proxy

Chocolatey

If you have Chocolatey for Windows installed then you can get Msysgit and Curl installed with two commands (running as administrator) in either DOS or Powershell:

C:\> choco install -y git
C:\> choco install -y curl

This should handle all the PATH configuration, but you will need to close and reopen your command prompt for it to work.

You can verify everything is correctly installed by opening a new command prompt and running:

C:\> git --version
git version 2.12.2.windows.2
C:\> curl --version
curl 7.52.1 (x86_64-w64-mingw32) libcurl/7.52.1 WinSSL zlib/1.2.8 WinIDN libssh2/1.7.0_DEV
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: IDN IPv6 Largefile SSPI Kerberos SPNEGO NTLM SSL libz

Vundle on Windows

Modern Windows Gvim Install

The official version of Gvim on windows by default looks for _vimrc instead of .vimrc and ~/vimfiles instead of ~/.vim. It also understands ~ as the home directory. You only need to tell it to convert to unix-style path separators (shellslash). Therefore, once you have git for windows, you simply run git clone https://github.com/VundleVim/Vundle.vim.git ~/vimfiles/bundle/Vundle.vim, and add the following to the beginning of your ~/_vimrc (_vimrc in your Windows Home directory, also ~/_vimrc from the git bash prompt):

filetype off
set shellslash
set rtp+=~/vimfiles/bundle/Vundle.vim
call vundle#begin('~/vimfiles/bundle')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'

" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList       - lists configured plugins
" :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line

Older versions of Gvim and Different File Names

By default, older versions of Vim on Windows will still look for .vimrc and install to ~/.vim. This doesn't work perfectly on Windows as the files aren't hidden, but .gitignore files are used in the same manner fairly commonly. You could for example change .vimrc to _vimrc and .vim to vimfiles - this would then require a change to the example vimrc below.

If you don't make these changes you should now be done with the pre-requisites and can go back to the main Vundle README and make the required vimrc changes.

Additionally, if you've set %HOME% environmental variable to some directory, that's the directory vim will search as ~/, thus you have to put .vimrc file and ~/.vim folder under the directory or remove %HOME% from environmental variable settings to use %USERPROFILE% as default.

If you've renamed the .vimrc and .vim names, open the cmd prompt or git bash and execute the following lines. If you do not have gvim on your path, use vim instead.

cd %USERPROFILE%
git clone https://github.com/VundleVim/Vundle.vim.git %USERPROFILE%/.vim/bundle/Vundle.vim
gvim .vimrc

From here, go to step 3 in the quick start and copy the sample config of Vundle into the .vimrc file.

Go to line around 11 and change

set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

to

set rtp+=$HOME/.vim/bundle/Vundle.vim/
call vundle#begin('$HOME/.vim/bundle/')

If you run into any problems, see the FAQ.

Trailing slash issue

Sometimes Bundle 'rstacruz/sparkup', {'rtp': 'vim/'} may not work for you. Note the vim/ part. The trailing slash causes Vim on windows to not load the plugin and may affect others. The fix is simple; change it to:

Bundle 'rstacruz/sparkup', {'rtp': 'vim'} 

See #193 for more details.

E484: Can't open file C:\Users\<userid>\AppData\Local\Temp\... Error

Under certain situations a Virus Checker or a Windows itself may prevent file creation in the Windows Temp folder located under the %USERPROFILE% folder. One possible solution might be to change the location of your %TEMP% and %TMP% variables to point elsewhere (perhaps C:\temp). To do this launch Control Panel -> System -> Advanced system settings -> Environment Variables and I change your TMP and TEMP variables from %USERPROFILE%\AppData\Local\Temp to C:\temp relaunched vim and then try your Vundle command that was previously failing with the E484 error.

For other solutions see Issue 575