Technology and General Blog

The VIM editor supplies a great aspect to highlight syntax dependent on regardless of what language you are programming in. This can make it much easier to edit the code and visually comprehend the syntax of the code. Nonetheless as a technique admin or DevOps engineer you may find on your own modifying several configuration documents of many formats and on different remote equipment and because of the devices you login to, the syntax highlighting will make the file unreadable in your session.

Therefore in this submit, we will show how to disable syntax highlighting in the .vimrc configuration file. This way all documents that you open will have simple textual content, with no any coloration techniques, and you can promptly get to perform.

I identified myself usually opening documents and then disabling syntax highlighting dynamically, its a lot more efficient to increase the command to the .vimrc file on just about every machine you use.

First make confident vim is installed. For instance run apt-get put in vim, or yum install vim, or whatever command is relevant to your distribution. On Home windows, the approach is considerably less simple to set up vim, but I will leave that for you to figure out.

Then in your house listing open the file, or build the file .vimrc.

In .vimrc disable syntax highlighting with the following code

Now let’s assess loooking at a file with syntax highlighting on and off.

I was just logged into a virtual box for Ubuntu 20.04 and making an attempt to edit a configuration file in systemd.

Here is the file with syntax highlighting on:

Detect the file is largely unreadable!

Here is the file with syntax highlighting off:

Notice you can now easily read through the file contents!

Syntax highlighting will assistance programmers who have configured it adequately for their language of decision to match their terminal configurations. But for random access of data files on numerous units, it usually will get in the way of efficiency.

Summary on syntax highlighting with vim

You can see evidently in the previously mentioned example, that when logging in to a lot of distinct devices you could discover your self irritated by VIM syntax highlighting. As the highlighting desires to be configured to practical, and for configuration file editing on new techniques, its often not optimized and annoying.

This posting presents you the configuration to disable syntax highlighting. Be sure to use it as wanted.

Leave a Reply

Your email address will not be published. Required fields are marked *