• windows下gvim使用vundle插件


    vundle是用于管理vim插件的插件。安装、更新和卸载插件只需修改_vimrc即可。

    以下是安装vundle的步骤,前提是已经安装了gvim7.4。(注:gvim不要安装到系统盘,否则没有权限编辑_vimrc文件

    1、下载Git并安装

    2、把以下代码复制到新建的文本文档,并命名为curl.cmd,然后放到C:Program FilesGitcmd(根据自己的Git安装目录进行修改)

    @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%in;%git_install_root%mingwin;%PATH%
    
    @if not exist "%HOME%" @set HOME=%HOMEDRIVE%%HOMEPATH%
    @if not exist "%HOME%" @set HOME=%USERPROFILE%
    
    @curl.exe %*

    3、把;C:Program Files (x86)Gitin;C:Program Files (x86)Gitlibexecgit-core添加到环境变量系统变量Path中。否则在使用vundle安装插件时会提示git不是内部名外部命令。(可能需要重启电脑)

    4、使用git下载vundle插件。打开Git Bash,进入Vim的安装目录,输入以下命令回车就可以把vundle下载到vimfiles/bundle/Vundle.vim目录下

    git clone https://github.com/gmarik/Vundle.vim.git vimfiles/bundle/Vundle.vim

    5、在_vimrc中插入以下代码,vundle算是完成了安装和配置

    set nocompatible              " be iMproved, required
    filetype off                  " required
    
    set rtp+=$VIM/vimfiles/bundle/Vundle.vim/
    let path='$VIM/Vimfiles/bundle'
    call vundle#begin(path)
    Plugin 'gmarik/Vundle.vim'         "管理Vundle自身 
    
    call vundle#end()            
    filetype plugin indent on


    6、配置新的插件,必须在call vundle#begin(path) 和 call vundle#end()之间填写插件路径。

    插件配置的路径遵循以下规则:1>二级目录直接加github.com前缀;2>一级目录加github.com/vim-scripts前缀;3>完整路径;4>完整本地路径

    1>Plugin 'gmarik/Vundle.vim' => https://github.com/gmarik/Vundle.vim
    2>Plugin 'ctrlp.vim' => https://github.com/vim-scripts/ctrlp.vim
    3>Plugin 'git://git.wincent.com/command-t.git'
    4>Plugin 'file:///path/from/root/to/plugin'


    7、在vim中输入:PluginInstall回车,vundle就会从github上把配置里的插件下载到vimfiles/bundle/目录中

    8、更多有关vundle的使用教程请查看vimfiles/bundle/Vundle.vim/doc/vundle.txt

  • 相关阅读:
    Django ORM多表操作
    Django 单表查询作业-笔记
    python 2 编码问题
    HTML-Bootstrap下载和基本使用
    Django ORM单表操作之增删改查
    Django ORM简介和单表创建的设置和过程
    Django --总结 之URL路由控制 视图相应,视图请求,和模板语法
    Django URL控制器
    JAVA编程
    UMI 的原理分析带有 UMI 的数据
  • 原文地址:https://www.cnblogs.com/wldragon/p/4509820.html
Copyright © 2020-2023  润新知