In my recent frenzy for PHP programming, I’ve been using Vim as main text editor (it comes by default in Ubuntu, and in most Linux flavours actually)… I have been tempted to use many full featured applications but many more experienced developers advised me to stick to something simple – do it the hard way or just don’t do it :)
Vim offers a lot of possibilities when it comes to text file editing – and to master this tool requires years of practice (here is the official Vim book – about 570 pages). Anyways, since Vim doesn’t use syntax highlighting by default, here is a little guide to enable this feature:
- Open a terminal
- Edit the file /etc/vim/vimrc
- Search for the word “syntax” (in Vim, type in /syntax and hit return)
- Remove the double quote mark at the beginning of the line
- Start Vim and open any configuration file or PHP file, and you should see syntax highlighting
That’s it, you’re all set… Here is a screenshot of the result :)
Note: to install Vim, just copy and paste sudo apt-get install vim-full in your terminal



or create a file named .vimrc in your home directory and add the following lines:
syntax on
set incsearch ” do incremental searching
set hlsearch