Managing VIM Plugins with Vundle

The vanilla VIM editor that comes pre-installed with Ubuntu is vim-tiny and not full vim. You can verify this by typing the following command in a terminal:


dpkg -l vim*

To install full fledged vim type:


sudo apt-get install vim

Vim is one of the most popular text editors in the *nix world. Its functionality can be extended by installing plugins and there are thousands of such plugins out there. Vundle is a plugin manager for vim much like pip is for Python. To install Vundle you will first need to install Git:

 

sudo apt-get install git

 

Clone Vundle:

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

Go to your home directory:

cd ~

And create the .vimrc file:

vim .vimrc

On top of the file put the following code:

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'
" 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
" Put your non-Plugin stuff after this line

To add more plugins add them below the line:

Plugin 'VundleVim/Vundle.vim'
but before:
call vundle#end() " required

For example if you want to install the plugin YouCompleteMe, your .vimrc will look like:

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'
Plugin 'Valloric/YouCompleteMe'
" 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
" Put your non-Plugin stuff after this line

After adding the name of the plugin to the .vimrc file you have to open vim and in the command mode type:


:PluginInstall

Similarly, to update the plugins:


:PluginUpdate

To list all plugins:


:Plugins

To search for a specific plugin:


:PluginSearch! plugin_name

To see all installed plugins:


:PluginList

To remove a plugin, first delete its entry from the .vimrc file and then issue the following command:


:PluginClean

Further Help:

Installing PyDev and Eclipse in Ubuntu 15.04

Before installing PyDev and Eclipse in Ubuntu 15.04 make sure you have java installed. To check whether java is already installed in your system type:


java -version

If java is installed you will get an output similar to the following:


openjdk version "1.8.0_45-internal"
OpenJDK Runtime Environment (build 1.8.0_45-internal-b14)
OpenJDK 64-Bit Server VM (build 25.45-b02, mixed mode)

If not then you will have to install java by typing:


sudo apt-get install openjdk-8-jdk

Then download the appropriate Eclipse Installer. After the downloading is completed, go to your Downloads directory and extract the tar.gz file just downloaded. Go inside the directory eclipse-installer, right click on the file eclipse-inst and click Run. The following window will appear:

Screenshot from 2016-04-19 12:39:17

Select one of the options and follow the on-screen instructions. Once the installation is finished, the last screen will provide you with an option to launch the application.

Once you are in Eclipse go to the menu Help –> Install New Software:

Screenshot from 2016-04-19 12:45:21

Click on Add:

Screenshot from 2016-04-19 13:14:51

In the Name filed type PyDev and in the Location filed type http://pydev.org/updates as shown below:

Screenshot from 2016-04-19 13:20:10

In the Work with field make sure to select PyDev site and check the item called PyDev in the list below:

Screenshot from 2016-04-19 13:23:52

Click on Next, confirm your selection and accept the license agreements before clicking on Finish. To verify the installation, start a new project and select PyDev Project:

Screenshot from 2016-04-19 13:30:56

Do a Quick Auto-Config for setting up the interpreter. Once the project is created, create a new file with .py extension. Write some Python code and click on Run.

Further Help: