Sunday, July 5, 2009

Vim Syntax ON

If you guys are using the vim editor in ubuntu like I do then you guys would have also noticed that - it would be great if there was syntax highlighting, for those who don't know this there is Syntax highlighting and many more features in VIM. To get this feature first you must download the full package of vim so go to your terminal and write the command
apt-get install vim-full


Once this package in loaded you can turn on the syntax in your vim by using this command " :syntax enable ". Now your programming experience would become much more hazel free.

If you hate writing that command every time you enter vim , then there is even a solution for that as well.

go to your terminal and write the commands
vim /etc/vim/vimrc
There you will find some line saying :
" Vim5 and later versions support syntax highlighting. Uncommenting the next
" line enables syntax highlighting by default.
"syntax on

There just remove the doube quote( " ) in the last line("syntax on) and the syntax will be on by default now onwards in your VIM.

Happy Coding

No comments: