install vim: sudo apt-get install cim
change the vim settings file:
cd /etc/vim
sudo gedit vimrc
add some information in the last line of the vimrc:
syntax on //highlight the grammar
set tabstop=4 //set the tab width as 4
set softtabstop //set the soft tab width as 4
set autoindent //set the auto indent
set cident //set the C++ Llandguage auto indent
set nu // display the row number on the left