Vundle for Windows

来源:互联网 发布:叫停网络售药 编辑:程序博客网 时间:2024/05/21 09:09

Vundle for Windows

Tobbe Lundberg edited this page 19 days ago · 39 revisions

 Pages 8

  • Home
  • BundleSearch error
  • Development Workflow
  • Examples
  • FAQ
  • Handling issues
  • Tips and Tricks
  • Vundle for Windows
Clone this wiki locally
 Clone in Desktop

Requirements

  1. Git
  2. Curl

Git on Windows

Thanks to msysgit installation is trivial:

  1. Download msysgit installer
  2. run downloaded installer and follow 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 --versiongit version 1.7.4.msysgit.0

Curl on Windows

Installing Curl on Windows is easy as Curl is bundled with msysgit! But before it can be used withVundle it's required make curl run in command prompt. The easiest way is to create curl.cmdwith this content

@rem Do not use "echo off" to not affect any child calls.@setlocal@rem Get the abolute path to the parent directory, which is assumed to be the@rem Git installation root.@for /F "delims=" %%I in ("%~dp0..") do @set git_install_root=%%~fI@set PATH=%git_install_root%\bin;%git_install_root%\mingw\bin;%git_install_root%\mingw64\bin;%PATH%@rem !!!!!!! For 64bit msysgit, replace 'mingw' above with 'mingw64' !!!!!!!@if not exist "%HOME%" @set HOME=%HOMEDRIVE%%HOMEPATH%@if not exist "%HOME%" @set HOME=%USERPROFILE%@curl.exe %*

And copy it to C:\Program Files\Git\cmd\curl.cmd, assuming msysgit was installed to c:\Program Files\Git

to verify all good, run:

C:\> curl --versioncurl 7.21.1 (i686-pc-mingw32) libcurl/7.21.1 OpenSSL/0.9.8k zlib/1.2.3Protocols: dict file ftp ftps http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftpFeatures: Largefile NTLM SSL SSPI libz

Vundle on Windows

Different File Names

By default, Vim on Windows will still look for .vimrc and install to ~/.vim. Since this isn't standard on Windows (you would have to enable hidden files) an alternative is to use _ files. That means instead of having a .vimrc file it will be a _vimrc in your home. Instead of .vim, we usually use a folder called vimfiles.

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 vimfiles folder under the directory or remove %HOME% from environmental variable settings to use %USERPROFILE% as default.

To make these changes, open the cmd prompt or msysgit 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%/vimfiles/bundle/Vundle.vimgvim _vimrc

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

Go to line around 11 and change

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

to

set rtp+=%HOME%/vimfiles/bundle/Vundle.vim/call vundle#begin('%USERPROFILE%/vimfiles/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 Variablesand I change your TMP and TEMP variables from %USERPROFILE%\AppData\Local\Temp to C:\temprelaunched vim and then try your Vundle command that was previously failing with the E484 error.

For other solutions see Issue 575


原文地址:https://github.com/VundleVim/Vundle.vim/wiki/Vundle-for-Windows

0 0
原创粉丝点击