How to Manage your vim plugins

来源:互联网 发布:json遍历里面的数组 编辑:程序博客网 时间:2024/05/20 00:37

How to manage your vim plugin files?

1.pathogen

links:https://github.com/tpope/vim-pathogen

How to Install pathogen: so easy

  • step1

    mkdir -p ~/.vim/autoload

    mkdir -p ~/.vim/bundle

    curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim

  • step2

    add this to your vimrc

    call pathogen#infect()  
Now You Have Finished Installation
Let Us Try An Example

It seems every vim plugin has a github url:
for example if you want to install vim-markdown

the url:https://github.com/plasticboy/vim-markdown

  • step1 cd ~/.vim/bundle
  • step2 git clone https://github.com/plasticboy/vim-markdown.git
  • step3 vim a example md to check your installation

2.Vundle

Vundle is short for vim bundle and is a vim plugin manager

link:https://github.com/VundleVim/Vundle.vim

How to Install Vundle:also easy

  • step1 mkdir -p ~/.vim/bundle
  • step2 cd ~/.vim/bundle
  • step3 git clone https://github.com/VundleVim/Vundle.vim.git

  • step4 add this to your at the top to your vimrc:

set nocompatible              " be iMproved, requiredfiletype off                  " requiredset rtp+=~/.vim/bundle/Vundle.vimcall vundle#begin()""""""""""""""""""""""""""Plugin 'VundleVim/Vundle.vim'Plugin 'tpope/vim-fugitive'Plugin 'git://git.wincent.com/command-t.git'Plugin 'file:///home/gmarik/path/to/plugin'Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}"""""""""""""""""""""""""""call vundle#end()             filetype plugin indent on    

The Plugin in “”“”” is the demo you want to install

For example:

If you want to install vim-markdown
You Find the github link is:
https://github.com/plasticboy/vim-markdown

So Your vimrc is like this:

set nocompatible              " be iMproved, requiredfiletype off                  " requiredset rtp+=~/.vim/bundle/Vundle.vimcall vundle#begin()""""""""""""""""""""""""""Plugin 'VundleVim/Vundle.vim'Plugin 'plasticboy/vim-markdown'"""""""""""""""""""""""""""call vundle#end()             filetype plugin indent on    ... Your other config

And You Save this file And vim without file(Launch vim )and run

:PluginInstall 

Then you can see the Installation is beginning.
The disadvantage is that you can not see the progress bar

原创粉丝点击