Vim plugins

The vim configuration file on a user basis is ~/.vimrc.  If you don’t have this file then make it.

I always like to start vim with numbering on so the first thing I put in this file is

set number

 

The global configuration file is /etc/vimrc.  in here I like to uncomment the following (Note:  You can use either config file, if you have different arguments for the same setting in both then the user setting overrides the global):

syntax on
set shocmd
set showmtach

There are other options in there, but this just a reminder of how I set it up.

YouCompleteMe

This is a fairly useful plugin for vim that assists when writing code.  There is a debian package, but I find the best way is to install it manually.  first add this to your ~/.vimrc file

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

Then run the following:

git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
cd ~/.vim/bundle
git clone https://github.com/Valloric/YouCompleteMe.git
cd YouCompleteMe
./install.py

Finally run vim and type

:PluginInstall

After a while it should say “done” and that is all there is to it.