FG

Highlighting a search term without moving the cursor

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

Problem

Using Vim, I sometimes find myself staring at a section of source code for a while and suddenly want some variable on the screen to pop out. That's easy: which highlights them all. My issue is that it more often than not the search shifts my window so I'm not looking at the source code from the sam…

Error Output

/<var>

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Highlighting a search term without moving the cursor

Low Risk

skyblue’s answer shows the core of the idea of how to use the normal search highlighting to accomplish what you want. I extended that technique by making a keybinding that works similarly to the command, but without actually moving to the next match…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment