Vim Syntax Highlighting How To Turn On , Off

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/vim-syntax-highlighting-turn-off/
PINTEREST
PINTEREST
INSTAGRAM

Vim is old and popular text editor. Vim roots goes to the vi. Vim is improved version of vi. Vim has a lot of features that makes users life better. One of the most loved vim feature is syntax highlighting. Syntax highlighting makes text or code easily readable by coloring statements. For this tutorial we will use following C code. Save this file as my.c .

Open File With Vim

We will open file with vim and insert code above.

Press i to switch insert mode and paste code above

and then save the code with Escape : w 

Turn On Highlighting

We will use :syntax on command in the vim in order to turn on or enable syntax highlighting

Turn On Highlighting

Turn On Highlighting

Turn On Highlighting

Turn On Highlighting

Turn Off Highlighting

We will give following command to turn off

Turn Off Highlighting

Turn Off Highlighting

Make Highlighting Setting Persistent

Highlighting setting can be made persistent by  adding setting to the setting files. There is two setting files to configure vim . First one is user setting file which is active for the current user and located in the current user home directory. This setting file is preferred system wide setting file.

Make Highlighting Setting Persistent

Make Highlighting Setting Persistent

Second setting file is system wide and locate at /etc/vim/vimrc . Same setting can be added to this file. This operation requires root privileges

LEARN MORE  How To Use Multiple Ssh Keys?

Make Highlighting Setting Persistent

Make Highlighting Setting Persistent

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/vim-syntax-highlighting-turn-off/
PINTEREST
PINTEREST
INSTAGRAM

You may also like...

Leave a Reply

Your email address will not be published.

Enjoy this blog? Please spread the word :)