Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Linux – how to turn off space highlighting

I am working on a shell script but noticed that space character is unnecessarily highlighting which is very annoying.

enter image description here

Tried to turn it off by :syntax off but that removes highlighting for all. Please suggest how can I turn off the space highlight.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

That looks like it might be highlighting the last search term. Try running :nohlsearch (or :noh for short).

If you perform another search, highlighting will be enabled again. To disable search highlighting entirely, run :set nohlsearch (or :set nohls).

Before I knew about the above commands, I used to search for a string that wouldn’t exist in my file, for example /rhrp. That would make the highlighting effectively disappear.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading