日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > windows >内容正文

windows

Windows下安装Vim插件管理Vundle

發布時間:2024/8/23 windows 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Windows下安装Vim插件管理Vundle 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

VIM是編輯器之神,這個就不用說了,越使用越會體會到VIM的強大與便利。但是它的強大建立在眾多插件組合之上,而Vim本身缺乏對插件的有效管理,安裝插件并配置_vimrc文件非常不便。gmarik受到Ruby的bunler的啟發,開發了vundle這個vim插件,可以將插件分到不同的目錄管理,更厲害的是可以很簡單的添加需要安裝的插件,然后通過指令簡單的安裝和更新,下面就介紹VIM和Vundle的安裝。

1.安裝Git。

Vundle基于Git架構,每一個插件都是一個項目的Repository,通過Vundle可以用簡單的指令,一鍵安裝/更新/刪除所有插件。

下載msysgit并安裝(具體可見http://drupalchina.cn/content/windows-xi-tong-xia-gitan-zhuang-tu-jie),并將Git 的安裝路徑加入環境變量Path,如

[cpp]?view plaincopy
  • D:\Program?Files\Git\cmd??
  • 然后運行cmd,輸入 [cpp]?view plaincopy
  • git?--version??
  • 如果能顯示Git版本信息,說明安裝成功。

    2. 配置Curl腳本。

    在Windows下還需要建立一個Curl腳本用于Vundle的遠程鏈接。在Git的路徑下新建一個空文本文件,改名為curl.cmd,編輯內容為

    [cpp]?view plaincopy
  • @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?%*??
  • 保存后運行cmd,輸入

    [cpp]?view plaincopy
  • curl?--version??
  • 如果可以看到版本信息說明配置成功。

    3. 安裝Vundle。

    Git安裝完成后,從官網Clone Vundle到Vim的安裝路徑下,如

    [cpp]?view plaincopy
  • git?clone?https://github.com/gmarik/vundle?D:\Vim\vimfiles\bundle\vundle??
  • 此時Vim的目錄結構應該如下所示

    D:Vim

    +---vim73

    +---vimfiles

    ? ? ? +---bundle

    ? ? ? ? ? ? ?+---vundle

    ? ? ? ? ? ? ? ? ? ? +---autoload

    4. 配置Vundle。

    按照Vundle官方給出的配置,所有通過Vundle安裝的插件會被安裝到Windows的用戶目錄下,這里做了修改,直接安裝到Vim目錄下方便管理。

    編輯_vimrc文件,加入

    [cpp]?view plaincopy
  • filetype?off??
  • "?此處規定Vundle的路徑??
  • set?rtp+=$VIM/vimfiles/bundle/vundle/??
  • call?vundle#rc('$VIM/vimfiles/bundle/')??
  • Bundle?'gmarik/vundle'??
  • filetype?plugin?indent?on??
  • ??
  • "?original?repos?on?github<br>Bundle?'mattn/zencoding-vim'??
  • Bundle?'drmingdrmer/xptemplate'??
  • ???
  • "?vim-scripts?repos??
  • Bundle?'L9'??
  • Bundle?'FuzzyFinder'??
  • Bundle?'bufexplorer.zip'??
  • Bundle?'taglist.vim'??
  • Bundle?'Mark'??
  • Bundle?'The-NERD-tree'??
  • Bundle?'matrix.vim'??
  • Bundle?'closetag.vim'??
  • Bundle?'The-NERD-Commenter'??
  • Bundle?'matchit.zip'??
  • Bundle?'AutoComplPop'??
  • Bundle?'jsbeautify'??
  • Bundle?'YankRing.vim'??
  • ???
  • filetype?plugin?indent?on?????"?required!???
  • 5.安裝插件

    安裝插件具體可看http://yp.oss.org.cn/blog/show_resource.php?resource_id=1561。

    后面的鏈接是我的VIM配置文件:https://github.com/cgnerds/vim。

    參考鏈接:

    1 AlloVince的VIM配置方案:http://yp.oss.org.cn/blog/show_resource.php?resource_id=1561

    2 使用Vundle來管理Vim插件:http://www.cnblogs.com/qiangji/archive/2011/07/31/Vundle.html

    3. VIM之Vundle:http://blog.csdn.net/codebistu/article/details/8257138

    4. 值得參考的VIM配置文件

    https://github.com/asins/vim/blob/master/_vimrc

    https://github.com/AlloVince/vim-of-allovince/blob/master/_vimrc

    總結

    以上是生活随笔為你收集整理的Windows下安装Vim插件管理Vundle的全部內容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。