Linux系统vim如何安装vundle组件


Linux系统下使用vim文本编辑器的时候,需要用到vundle组件,那么vundle组件要如何安装呢?想必不少用户遇到这样的难题,下面小编就给大家介绍下Linux系统vim安装vundle组件的方法。

一、在Linux上安装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 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()

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)。

上面就是Linux安装vundle组件的方法介绍了,在安装vundle组件前,需要先在Linux上安装git,否则安装不一定成功。


上一篇:Linux更改Docker运行根目录的方法

下一篇:Linux系统如何添加修改和删除用户账号


Linuxvim vimvundle安装
Copyright © 2002-2019 测速网 www.inhv.cn 皖ICP备2023010105号
测速城市 测速地区 测速街道 网速测试城市 网速测试地区 网速测试街道
温馨提示:部分文章图片数据来源与网络,仅供参考!版权归原作者所有,如有侵权请联系删除!

热门搜索 城市网站建设 地区网站制作 街道网页设计 大写数字 热点城市 热点地区 热点街道 热点时间 房贷计算器