1. 程式人生 > 實用技巧 >vim外掛安裝

vim外掛安裝

我勒個去,折騰了一上午,終於安裝好了幾個外掛
雖然還是沒有我最想要的智慧補全功能,但是還是有點改進
趕緊記下來安裝步驟以防忘記


  1. 安裝vundle
  • 步驟1:安裝git

    命令列執行命令git -version,顯示版本資訊則表明安裝成功

  • 步驟2:配置curl.cmd檔案:

    @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 %*
    

    將這個檔案命名為"curl.cmd"並放到Git的安裝目錄D:\Git\下。

    命令列執行命令git -version,顯示版本資訊則表明配置成功

  • 步驟3:安裝vundle:在cmd中執行以下命令:

    git clone https://github.com/gmarik/vundle.git D:/Vim/vimfiles/bundle/vundle

  • 步驟4:更改_vimrc配置檔案,在配置檔案中加入以下片段:

    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'
    
  • 步驟5:啟動gVim,輸入以下命令:

    :BundleInstall

  • 步驟6:安裝ctags:下載好ctags後安裝到任一指定目錄

  • 步驟7:將ctags.exe檔案所在的路徑新增到環境變數PATH

  • 步驟8:在_vimrc檔案中新增:let Tlist_Ctags_Cmd='D:\Vim\vimfiles\ctags58\ctags.exe'