1 vundle使用

  • Post author:
  • Post category:其他

Vundle 是 Vim bundle 的简称,是一个 Vim 插件管理器. 

$ git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

注意安装的默认路径

添加到vimrc配置文件中 保存后再次进来:PluginInstall 即可
set nocompatible              " 去除VI一致性,必须要添加
filetype off                  " 必须要添加

" 设置包括vundle和初始化相关的runtime path
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" 另一种选择, 指定一个vundle安装插件的路径
"call vundle#begin('~/some/path/here')

" 让vundle管理插件版本,必须
Plugin 'VundleVim/Vundle.vim'

" 以下范例用来支持不同格式的插件安装.
" 请将安装插件的命令放在vundle#begin和vundle#end之间.
" Github上的插件
" 格式为 Plugin '用户名/插件仓库名'
Plugin 'tpope/vim-fugitive'
" 来自 http://vim-scripts.org/vim/scripts.html 的插件
" Plugin '插件名称' 实际上是 Plugin 'vim-scripts/插件仓库名' 只是此处的用户名可以省略
Plugin 'L9'
" 由Git支持但不再github上的插件仓库 Plugin 'git clone 后面的地址'
Plugin 'git://git.wincent.com/command-t.git'
" 本地的Git仓库(例如自己的插件) Plugin 'file:///+本地插件仓库绝对路径'
"Plugin 'file:///home/gmarik/path/to/plugin'
" 插件在仓库的子目录中.
" 正确指定路径用以设置runtimepath. 以下范例插件在sparkup/vim目录下
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" 安装L9,如果已经安装过这个插件,可利用以下格式避免命名冲突
Plugin 'ascenator/L9', {'name': 'newL9'}

" 你的所有插件需要在下面这行之前
call vundle#end()            " 必须
filetype plugin indent on    " 必须 加载vim自带和插件相应的语法和文件类型相关脚本
" 忽视插件改变缩进,可以使用以下替代:
"filetype plugin on
"
" 常用的命令
" :PluginList       - 列出所有已配置的插件
" :PluginInstall     - 安装插件,追加 `!` 用以更新或使用 :PluginUpdate
" :PluginSearch foo - 搜索 foo ; 追加 `!` 清除本地缓存
" :PluginClean      - 清除未使用插件,需要确认; 追加 `!` 自动批准移除未使用插件 
"更新插件BundleUpdate
"列出所有插件BundleList 
"查找插件BundleSearch 
" 查阅 :h vundle 获取更多细节和wiki以及FAQ

BundleInstall

set nocompatible              " 去除VI一致性,必须要添加
filetype off                  " 必须要添加

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

call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'L9'
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
call vundle#end()            " 必须

filetype plugin indent on    " 必须 加载vim自带和插件相应的语法和文件类型相关脚本
filetype plugin on

比较简洁一些

安装完后 http://bytefluent.com/vivify/ 可以配颜色 得到.vim文件

设置色彩 高亮 

set t_Co=256 ” required
syntax enable
syntax on

建colors文件夹 把文件放进去 然后修改colorscheme 文件名(不带.vim)

注意插件里的 Plugin 一旦注释掉就无法使用了

set nocompatible              " 去除VI一致性,必须要添加  
filetype off                  " 必须要添加  

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

call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'L9'
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
Plugin 'ctrlp.vim'
Plugin 'incsearch.vim'
Plugin 'vim-airline'
Plugin 'tabular'
"https://zhuanlan.zhihu.com/p/24742679?refer=hack-vim
call vundle#end()            " 必须  

filetype plugin indent on    " 必须 加载vim自带和插件相应的语法和文件类型相关脚本  
filetype plugin on

set t_Co=256 " required
syntax enable
syntax on
colorscheme corporation

set hlsearch
filetype indent on
set et
set ci
set cindent
set shiftwidth=2
autocmd FileType make setlocal noexpandtab
set cinoptions={0,1s,t0,n-2,p2s,(03s,=.5s,>1s,=1s,:1s

set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'Valloric/YouCompleteMe'
Plugin 'Chiel92/vim-autoformat'
"filetype plugin indent on
call vundle#end()
这样也可以



版权声明:本文为sinat_24820331原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。