Wednesday, November 18, 2009

Color highlight in Vim

First of all we'll edit or create ~/.vimrc file:

Code:" Set syntax highlighting to always on
syntax enable

" Set the background to dark and the colorscheme to murphy
set background=dark
colorscheme murphy

" Set automatic filetype detection to on
filetype on


From now, by default highlight would be enabled and the colorscheme we'll be "murphy". If we wanted to use another color highlight we can download it from this site:

http://www.cs.cmu.edu/%7Emaverick/VimColorSchemeTest/index-pl.html

After downloaded the file, save it in ~/.vim/colors/ directory.

Sources:
http://www.linuxquestions.org/questions/linux-software-2/color-highlight-in-vim-howyoudothat-565358/

No comments: