下面來給各位介紹linux下vim安裝vundle并安裝emmet,如果你對于這兩個組件不理解可以和小編一起來看看此教程,首先在Windows上安裝git,自行搞掂,謝謝.
設置 curl命令工具,Curl已經在安裝git時就帶上了,接下來需要的是稍稍配置下使得它能在命令提示符中使用,找到git的安裝目錄,然后進入cmd目錄,新建一個名為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 –version來驗證下curl是否可用了.
切換到用戶主目錄,運行:
git clone https://github.com/gmarik/vundle.git .vim/bundle/vundle
然后在用戶主目錄下新建一個名為 .vimrc的文件,我的文件內容如下:
- set nu
 - set fileencoding=utf-8
 - set fileencodings=utf-8,gb18030,gb2312,gbk,big5
 - set ts=4
 - set expandtab
 - set autoindent
 - set nocompatible
 - set syntax=on
 - filetype off " required!
 - set rtp+=~/.vim/bundle/vundle/
 - call vundle#rc()
 - //Vevb.com
 - " let Vundle manage Vundle
 - " required!
 - Bundle 'gmarik/vundle'
 - Bundle 'mattn/emmet-vim'
 - Bundle 'Auto-Pairs'
 - Bundle 'php-doc'
 - Bundle 'PHPDoc-Script-PDocS'
 - let g:user_emmet_expandabbr_key = '<Tab>'
 - let g:user_emmet_settings = {'indentation': ' '}
 - filetype plugin indent on " required!
 
這樣Vundle的安裝就完畢了,要使用Vundle,可以在上面創建的 _vimrc中添加 Bundle ‘bundle_name’,然后打開vim,運行Vundle相關的命令來執行.
安裝插件::BundleInstall
更新插件::BundleInstall!
卸載插件::BundleClean
至于有什么樣的插件可以添加,可以到vim-scripts.org查找,除此之外,還可以添加git管理的repo,包括GitHub上的,不在GitHub上的,以及本地repo.
新聞熱點
疑難解答