Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to disable vim from carrying highlighting between editing sessions?

For example, I was looking for the definition of pi (M_PI) in /usr/include/math.h and searched /PI to find ti real quick.

Now I went to edit a program that had the name of a fellow author on it, Pierre, and the Pi in **Pi**erre was highlighted as it had carried voer from my last editing session. What would I put in my .vimrc to disable this weird continuation fo my search term?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You probably want this in your ~/.vimrc:

:set viminfo+=h


:help viminfo-h
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.