vim win装_vim插件管理器的安装和配置-windows

# vim插件管理器的安装和配置-windows

### 前言

-----------------------------

- vim做一框功能强大的编辑器,扩展功能令人称奇,插件机制非常灵活

- 本篇推荐两款vim的插件管理器vundle和vim-plug

- vundle是一款老款的插件管理工具

- vim-plug相对较新,特点是支持异步加载,相比vundle而言

### vundle

-----------------------------

#### 简介

-----------------------------

- vundle是开源项目

- [项目地址](https://github.com/VundleVim/Vundle.vim)

#### 先决条件

-----------------------------

- git

- [下载地址](https://gitforwindows.org/)

- curl

- [下载地址](https://curl.haxx.se/download.html)

- 配置下环境变量

#### 安装

-----------------------------

- `git clone https://github.com/VundleVim/Vundle.vim.git %USERPROFILE%/.vim/bundle/Vundle.vim`

- %USERPROFILE% 当前用户路径

#### 配置

-----------------------------

- 在`_vimrc`配置文件中添加如下内容

```

set nocompatible " 去掉vim的扩展,和vi保持兼容

filetype off " 关闭文件类型检测

" set the runtime path to include Vundle and initialize

" 设置运行时路径包括Vundle和初始化

set rtp+=~/.vim/bundle/Vundle.vim

call vundle#begin()

" let Vundle manage Vundle, required 让Vundle管理Vundle

Plugin 'VundleVim/Vundle.vim'

" All of your Plugins must be added before the following line

call vundle#end() " required

filetype plugin indent on " 文件类型检测插件,开启

" To ignore plugin indent changes, instead use:

"filetype plugin on

"

" Brief help 帮助

" :PluginList - lists configured plugins

" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate

" :PluginSearch foo - searches for foo; append `!` to refresh local cache

" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal

"

" see :h vundle for more details or wiki for FAQ

" Put your non-Plugin stuff after this line

```

### vim-plug

-----------------------------

#### 简介

-----------------------------

- vim-plug是开源项目

- [项目地址](https://github.com/junegunn/vim-plug)

#### 安装

-----------------------------

- 下载plug.vim放在`auload`目录下

#### 配置

-----------------------------

- 在`_vimrc`配置文件中添加如下内容

```

call plug#begin('~/.vim/plugged')

" Make sure you use single quotes

" Shorthand notation; fetches https://github.com/junegunn/vim-easy-align

" 一款文本对齐的插件,非常神奇

Plug 'junegunn/vim-easy-align'

" Any valid git URL is allowed

" github公告板,刷帖

Plug 'https://github.com/junegunn/vim-github-dashboard.git'

" Multiple Plug commands can be written in a single line using | separators

Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'

" On-demand loading 按需加载

Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }

Plug 'tpope/vim-fireplace', { 'for': 'clojure' }

" Using a non-master branch

Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' }

" Using a tagged release; wildcard allowed (requires git 1.9.2 or above)

Plug 'fatih/vim-go', { 'tag': '*' }

" Plugin options

Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' }

" Plugin outside ~/.vim/plugged with post-update hook

Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }

" Initialize plugin system

call plug#end()

```

### vim脚本插件

-----------------------------

- [vim脚本仓库](http://vim-scripts.org/vim/scripts.html)

- [vim脚本仓库,比较好用](https://vimawesome.com/)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值