# Enable syntax highlighting and colors in vim

**URL:** <https://linux-tips.com/t/enable-syntax-highlighting-and-colors-in-vim/166>\
**Category:** Shell\
**Created:** [April 28, 2008, 5:43am UTC](https://linux-tips.com/t/enable-syntax-highlighting-and-colors-in-vim/166 "2008-04-28T05:43:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![demirten](https://linux-tips.com/user_avatar/linux-tips.com/demirten/32/64_2.png) [@demirten](https://linux-tips.com/u/demirten)\
**Post date:** [April 28, 2008, 5:43am UTC](https://linux-tips.com/t/enable-syntax-highlighting-and-colors-in-vim/166/1 "2008-04-28T05:43:30Z")

</div>

You’re editing a C source file and while you’re still in vim editor session and want to enable syntax highligting feature, just give the following command, pressing ESC before:

```
:syntax on

```

You can make this behaviour as default for your own future user session entering following lines in your `~/.vimrc` file:

```
syntax on

```

You can even make this behaviour as a system wide default with entering above lines in `/etc/vim/vimrc` configuration file.
