VIM Vundle Tutorial

28/12/2020
VIM is a programmable console based text editor. It is highly configurable and it has many plugins. But managing these plugins manually is hard. That’s why a Plugin Manager is very useful. Vundle is a Plugin Manager for VIM text editor.

In this article, I will show you how to use VIM Vundle Plugin Manager to manage VIM Plugins. Let’s get started.

Installing Vundle

First, you have to install Git version control system. It is available on the official package repository of any Linux distributions. I will use Debian 9 Stretch for this article.

For Ubuntu, Debian, Linux Mint and other Debian based distros:

Update the package repository cache with the following command:

$ sudo apt-get update

Then install Git with the following command:

$ sudo apt-get install git -y

Git should be installed.

For Fedora, RHEL, CentOS:

To install Git on Fedora, RHEL and CentOS, run the following commands:

$ sudo yum makecache
$ sudo yum install git -y

Now you can install VIM with the following command:

$ sudo apt-get install vim -y

VIM should be installed. In my case, it’s already installed on my system.

For Fedora, RHEL, CentOS, run the following command to install VIM:

$ sudo yum install vim -y

Now go to the official website of Vundle at https://github.com/VundleVim/Vundle.vim

You should see the following page.

Now click on “Clone or download” button as marked red on the screenshot below. A popup window should appear. Click on the icon as marked blue in the screenshot. The git repository URL should be copied.

Now open up a Terminal and run the following command:

$ git clone PASTE_URL_HERE ~/.vim/bundle/Vundle.vim

After pasting the URL, the command should look like this:

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

The Github repository should be cloned in the ‘.vim/bundle/Vundle.vim’ directory in the USER’s home directory.

Now run the following command:

$ vim ~/.vimrc

It should open .vimrc file with VIM. If .vimrc file doesn’t exist, an empty file should be opened.

In my case, I already have an existing .vimrc file.

Now go to the end of the .vimrc file and press <o>


Now add the following lines as shown in the screenshot below. Then save and exit vim with VIM command ‘:wq!’

Now add the following lines as shown in the screenshot below. Then save and exit vim with VIM command ‘:wq!’

set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin ‘VundleVim/Vundle.vim’

" Add plugins here

call vundle#end()
filetype plugin indent on

Now open vim.

Run the following VIM command to initialize Vundle Plugin Manager:

:PluginInstall

The Vundle plugin should be installed.

Searching and Installing Plugin using Vundle Plugin Manager:

You can search for VIM plugins using Vundle Plugin Manager.

Let’s say you want to install a color scheme for VIM. Run the following VIM command to search for all the available VIM colorscheme plugins.

:PluginSearch colorscheme

You should see a lot of colorscheme plugins as shown in the screenshot below.

I am going to install ‘Royal-Colorschemes’.

To install a plugin, just move the VIM cursor to the line and press ‘i’

The plugin should be installed.

Now copy the line.

Paste it in the ‘.vimrc’ file in the section as shown in the screenshot below.

Listing Installed Plugins:

You can also list all the installed VIM plugins with the following VIM command:

:PluginList

You can see that I have 2 plugins installed right now.

Installing a Plugin from Github using Vundle Plugin Manager:

You can install a plugin from Github repository as well. Let’s say you want to install ‘powerline’ from the Github repository of powerline.

Go to the Github page of powerline and copy the project author/name section as marked in the screenshot below.

Open the ‘.vimrc’ file and type in the following line in the marked section.

Plugin ‘GITHUB_REPO_USER/GITHUB_REPO_PROJECT_NAME’

Then save the file and exit out of VIM.

Now start VIM and run the following VIM command to install the plugin using Vundle Plugin Manager.

:PluginInstall

Powerline plugin should be installed as shown in the screenshot below.

You can list the available plugins with ‘:PluginList’ command.

You should be able to see ‘powerline’ there.

Removing a Plugin using Vundle Plugin Manager:

You can also remove a Plugin using Vundle Plugin Manager.

First run ‘:PluginList’ command to list all the installed VIM plugins.

These are the plugins I have installed right now.

Let’s delete ‘powerline’ plugin. To delete powerline plugin, just move your cursor to the line and press <Shift>+<D>

The plugin should be deleted.

Now open ‘.vimrc’ file again, remove the marked line for powerline and save the file.

‘.vimrc’ file with powerline plugin line removed.

That’s it.

So that’s how you use VIM Vundle Plugin Manager to manage VIM plugins easily. Thanks for reading this article.

ONET IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, ONET IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

Proxy là gì? Mua Proxy ở đâu giá rẻ nhất?

Mua proxy Việt Nam, Mua proxy giá rẻ ở đâu uy tín? Hướng dẫn mua proxy Việt Nam Chúng tôi thật vinh...
09/11/2022

Top 7 Best Linux Terminals

It doesn’t matter if you’re a casual Linux user or a season system administrator, a good terminal emulator can vastly...
29/12/2020

Find Out How Much Disk Space a Directory Consumed from the Command Line

On a graphical desktop environment, you can find out how much disk space a directory consumed by just right clicking on...
29/12/2020
Bài Viết

Bài Viết Mới Cập Nhật

Mua Proxy V6 Nuôi Facebook Spam Hiệu Quả Tại Onetcomvn
03/06/2024

Hướng dẫn cách sử dụng ProxyDroid để duyệt web ẩn danh
03/06/2024

Mua proxy Onet uy tín tại Onet.com.vn
03/06/2024

Thuê mua IPv4 giá rẻ, tốc độ nhanh, uy tín #1
28/05/2024

Thuê địa chỉ IPv4 IPv6 trọn gói ở đâu chất lượng, giá RẺ nhất?
27/05/2024