My System
- Ubuntu Desktop 18.04 LTS
- Window Manager: i3WM
- No virtualization.
- Native install.
Parts of this question comes from my post on Facebook
Some days ago I was trying to identify this terminal text editor because of the plugins which are available on the left and right sidebars:
So far we have identified that the editor is vi
and I have successfully installed nerdtree
plugin as it shows in the left sidebar, it was suggested in the comments of my Facebook post. Now I am looking for a way to install the minimap on the right. Maybe it is a plugin or something.
Any ideas?
Screenshots were added from my own desktop. Please notice that I am a i3WM user and I am using Yakuake as my terminal emulator.
NOTE
I guess this is the minimap https://github.com/severin-lemaignan/vim-minimap but I can't find a way to install in Ubuntu.
Screenshots from my Desktop
Update
This is what happens when I press i after selecting the Plugin 'severin-lemaignan/vim-minimap'
inside the Plugin Installer from whithin vim
I found a solution on this page: https://linuxhint.com/vim-vundle-tutorial/
I had to remove (purge) vim and everything related to whatever I did before, and start again following the instructions provided in this (and other pages which I'll refer to later), that's how I ended up with this manual, which I share here for the convenience of some people who may wish to do this from scratch.
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:
Then install Git with the following command:
Git should be installed, upgraded or if you already have the newest version, you'll receive a message saying git is already the newest version.
For Fedora, RHEL, CentOS:
To install Git on Fedora, RHEL and CentOS, run the following commands:
Now you can install VIM with the following command:
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:
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:
After pasting the URL, the command should look like this:
The Github repository should be cloned in the ‘.vim/bundle/Vundle.vim’ directory in the USER’s home directory.
Now run the following command:
Or if you prefer you can use nano:
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 pressNow 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!
Now open vim.
Run the following VIM command to initialize Vundle Plugin Manager:
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.
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.
Installing Minimap
After following the tutorial above, I simply followed the instructions provided in the README.MD file of A code minimap for Vim at https://github.com/severin-lemaignan/vim-minimap
Vundle
Installing The NERDTree
The instructions provided in the README.markdown file for NERDTree in order to install it, is as easy as placing the next line in the
.vimrc
file.The same file provides a way to make it permanent and open automatically when you run
vim
, you just need to place this into your.vimrc
file:My additions
I added the next lines to my .vimrc file in order to always show the Minimap, the line numbers and to provide mouse compatibility when editing.
That's it!
Now my vim looks like this.
Vertical monitor
Horizontal (laptop) monitor
First, make sure that the line:
Plugin 'severin-lemaignan/vim-minimap'
is not repeated in your~/.vimrc
file.However, other users have reported this issue with no repeated lines. I think I found a fix for this. You need to edit your
~/.vim/bundle/Vundle.vim/autoload/vundle/config.vim
file. Run the following command to make the change: