VIM text editor color syntax highlighting

Did you know that you can easily turn on color syntax highlighting and switch to another color schemes in the vim text editor?

Start Vim and press [esc] followed by the commands:

:syntax on

and

:colorscheme murphy

The murphy theme is my personal favourite, but feel free to pick one of the other build in themes: blue | darkblue | default | delek | desert | elflord | evening | industry | koehler | morning | pablo | peachpuff | ron | shine | slate | torte | zellner

If you wish to permanently use the syntax highlighting and color scheme simply create a file .vimrc in your home directory:

vim ~/.vimrc

and include the following two lines:

syntax on
colorscheme murphy

wq! to save 😉

Oh, and if you just cant get enough of all those colours you can also spice up your bash shell:

vim ~/.bashrc

search for:
#force_color_prompt=yes

and remove the # to enable system colours

save your changes, exit VIM and type:

source ~/.bashrc

result:

bash

About Normen 19 Articles
Normen is a freelance senior network security engineer specialised in Check Point Technologies solutions. If you like his articles you can buy him an espresso here

Be the first to comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.