Turn syntax highlighting on/off in vim

vim.png

Open file (for example file.c):
$ vi file.c

Now press ESC key, type : syntax on
:syntax on

To turn it back off, press ESC key, type : syntax off
:syntax off

You can edit ~/.vimrc file and add command syntax on to it so that next you will start vim with color syntax highlighting option
$ cd
$ vi .vimrc

Append the following line:
syntax on
Save and close the file.

Related Posts

Comments are closed.