零基础学IT之笔记-Vundle.vim

      vim作为强大的编辑器工具,开发人员或其他使用者经常借助插件增强其功能。本人属非计算机专业的零基础人员,在此记录下一些最基本的vim相关知识作为自己的笔记,算是自己对知识的一种学习方法吧。

Vundle是 vim bundle的简写,vim插件的管理工具。

安装:

vundle.vim的安装需要git,用如下命令进行安装:

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

如果~/.vim/bundle不存在要先创建:mkdir -p ~/.vim/bundle

配置插件:

先在用户家目录下创建vim的配置文件.vimrc,

$touch ~/.vimrc , 然后将以下内容加入.vimrc,(注:加入的内容只是用于演示的目的,不需要的插件可以移除):

set nocompatible              " be iMproved, required

filetype off                  " required

" set the runtime path to include Vundle and initialize

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

call vundle#begin()

" alternatively, pass a path where Vundle should install plugins

"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required

Plugin 'VundleVim/Vundle.vim'

" The following are examples of different formats supported.

" Keep Plugin commands between vundle#begin/end.

" plugin on GitHub repo

Plugin 'tpope/vim-fugitive'

" plugin from http://vim-scripts.org/vim/scripts.html

Plugin 'L9'

" Git plugin not hosted on GitHub

Plugin 'git://git.wincent.com/command-t.git'

" git repos on your local machine (i.e. when working on your own plugin)

Plugin 'file:///home/gmarik/path/to/plugin'

" The sparkup vim script is in a subdirectory of this repo called vim.

" Pass the path to set the runtimepath properly.

Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}

" Install L9 and avoid a Naming conflict if you've already installed a

" different version somewhere else.

Plugin 'ascenator/L9', {'name': 'newL9'}

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

call vundle#end()            " required

filetype plugin indent on    " required

" 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

安装插件:

CLI中运行vim,然后运行:PluginInstall , 也可直接在CLI中运行vim +PluginInstall +qall 。

综上所述,在git clone完成后,插件的安装基本分成两步:

1 .先在.vimrc文件中配置要安装的插件;

2. 在vim中运行:PluginInstall 。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 工欲善其事,必先利其器,第一次从头开始打造自己的vim,特记录下流程~安装插件有:bundle, YouCompl...
    tianxinheihei阅读 2,014评论 0 4
  • .vimrc内容如下 "=============================================...
    Morb1d阅读 1,030评论 0 0
  • 真实有效的Vim配置记录(macOS) 以前在Ubuntu里配置了两次Vim,macOS中配置了一次,都没有配置成...
    染微言阅读 11,553评论 0 8
  • 安装依赖库(支持Python 3、Lua、Ruby) sudo apt-get install libncurse...
    Cyfeng阅读 2,166评论 0 2
  • 干细胞成功创业的小公司:人工胰岛、造血干细胞、人工角膜; 先进的科技从来不会凭空冒出来,它一定诞生于行业内优秀学者...
    刘旗阅读 200评论 0 0