FG
💻 Software

Vim: make star "*" command stay on current word

Fresh7 days ago
Mar 15, 20261213 views
Confidence Score0%
0%

Problem

In most use cases I use * command just to highlight current word in source code to make sure that it was typed right for example. How can I make star command to stay on current word? If that is impossible, how can I bind another key to do that?

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Vim: make star "*" command stay on current word

Low Risk

I think the simplest solution is this mapping: where the last two characters are two backticks to restore the cursor to the original position. Another solution would be but that moves the cursor to the beginning of the word. Both solutions have the …

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment