vim基礎(chǔ)環(huán)境安裝
- 安裝gvim
默認(rèn)VIM目錄結(jié)構(gòu):
\vim
\vim\vim74
\vim\vimfiles (預(yù)留給用戶的文件存放目錄织阅,建議后刪除自定義)
_vimrc(vim第一加載的用戶配置文件)
為實(shí)現(xiàn)綠化统台,建議所有配置都在\vim\_vimrc
設(shè)置。幾個(gè)好處:1 重裝系統(tǒng)不影響使用缘挽。2 對(duì)應(yīng)$MYVIMRC
變量裕膀,可以通過該變量訪問配置文件员串。
- 安裝git(內(nèi)置msysGit),安裝過程選擇“Use Git from the Windows Command Prompt”
- 在git安裝目錄下創(chuàng)建curl.cmd昼扛,路徑
C:\Program Files\Git\cmd\curl.cmd
寸齐,內(nèi)容如下:
@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 %*
4.運(yùn)行curl --version檢驗(yàn)curl配置情況
> 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 tftp
Features: Largefile NTLM SSL SSPI libz
插件安裝
安裝vim-plug 插件管理器 Github vim-plug
下載vim-plug.vim到vim安裝目錄\vim\vim74\autoload
下欲诺,autoload目錄下的文件將會(huì)在被調(diào)用時(shí)自動(dòng)加載。增加如下內(nèi)容到
_vimrc
call plug#begin('$VIM/ray/plugin')
Plug 'bling/vim-airline'
call plug#end()
_vimrc中的call plug#begin會(huì)自動(dòng)調(diào)用vim-plug.vim功能渺鹦,其中'$VIM/ray/plugin'
用于指定安裝plugin到哪個(gè)目錄扰法。參考: Github vim-plug FAQ
- 使用
:PlugInstall
命令安裝插件
在用的Plugin:
1. vim-airline