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 give following command into vim

Turn Off Highlighting

We will give following command to turn off

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.

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

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

LEARN MORE  How To Get Volume Information of VM in Libvirt

Leave a Reply

Your email address will not be published.