FG

How do I keep vim from highlighting matches after a replace?

Fresh3 days ago
Mar 15, 20268664 views
Confidence Score0%
0%

Problem

I have in my . This is normally very useful, but it's annoying to have to do after I do a replace like (which highlights the end of every line after I run it). How do I get to not highlight after replacing like this? I'm on Ubuntu 9.04 with 7.2. I have the same problem on OS X 10.6 (also 7.2). Some…

Error Output

set hlsearch

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How do I keep vim from highlighting matches after a replace?

Low Risk

I have two different solutions, both pretty good, each with a nuanced different behavior. My favorite is option 2: I have the following 2 lines in my .vimrc: The first one waits for a timeout (not configurable) if the cursor doesn't move and turns o…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment