windows下gvim使用vundle外掛程式

來源:互聯網
上載者:User

標籤:

vundle是用於管理vim外掛程式的外掛程式。安裝、更新和卸載外掛程式只需修改_vimrc即可。

以下是安裝vundle的步驟,前提是已經安裝了gvim7.4。(註:gvim不要安裝到系統硬碟,否則沒有許可權編輯_vimrc檔案)

1、下載Git並安裝

2、把以下代碼複製到建立的文字文件,並命名為curl.cmd,然後放到C:\Program Files\Git\cmd\(根據自己的Git安裝目錄進行修改)

@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;%PATH%@if not exist "%HOME%" @set HOME=%HOMEDRIVE%%HOMEPATH%@if not exist "%HOME%" @set HOME=%USERPROFILE%@curl.exe %*

 

3、把;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Git\libexec\git-core添加到環境變數系統變數Path中。否則在使用vundle安裝外掛程式時會提示git不是內部名外部命令。

4、使用git下載vundle外掛程式。開啟Git Bash,進入Vim的安裝目錄,輸入以下命令斷行符號就可以把vundle下載到vimfiles/bundle/Vundle.vim目錄下

git clone https://github.com/gmarik/Vundle.vim.git vimfiles/bundle/Vundle.vim

 

5、在_vimrc中插入以下代碼,vundle算是完成了安裝和配置

set nocompatible              " be iMproved, requiredfiletype off                  " requiredset rtp+=$VIM/vimfiles/bundle/Vundle.vim/let path=‘$VIM/Vimfiles/bundle‘call vundle#begin(path)Plugin ‘gmarik/Vundle.vim‘         "管理Vundle自身 call vundle#end()            filetype plugin indent on


6、配置新的外掛程式,必須在call vundle#begin(path) 和 call vundle#end()之間填寫外掛程式路徑。

外掛程式配置的路徑遵循以下規則:1>二級目錄直接加github.com首碼;2>一級目錄加github.com/vim-scripts首碼;3>完整路徑;4>完整本地路徑

1>Plugin ‘gmarik/Vundle.vim‘ => https://github.com/gmarik/Vundle.vim2>Plugin ‘ctrlp.vim‘ => https://github.com/vim-scripts/ctrlp.vim3>Plugin ‘git://git.wincent.com/command-t.git‘4>Plugin ‘file:///path/from/root/to/plugin‘


7、在vim中輸入:PluginInstall斷行符號,vundle就會從github上把配置裡的外掛程式下載到vimfiles/bundle/目錄中

8、更多有關vundle的使用教程請查看vimfiles/bundle/Vundle.vim/doc/vundle.txt

windows下gvim使用vundle外掛程式

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.