VSCodeVim / VSCodeVim/Vim

Option to disable search highlight after cursor is moved

Open
#5,528 1 comment 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
15.2k
Forks
1.5k
Avg merge
3d 18h
Merged PRs (30d)
6

Description

This is a small change, but it'd be nice if you could clear the search highlight after moving the cursor (i.e., hitting any other key other than n/N). I couldn't figure out a good way to do this via keymappings, so if anyone has ideas I'm all ears. Things I've tried:

  • Map various movement keys to the same key + :noh (this doesn't perform very well and can sometimes give unexpected results, and isn't needed like 80% of the time so it feels way too hacky/inelegant)
  • Map ESC to ESC + :noh - this is where I'm at now, but again, it doesn't feel very elegant

Thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named in the issue. Start by locating the search-highlight and key-handling entry points, then verify the requested behavior: moving the cursor with any key other than n/N clears the highlight without requiring a manual :noh mapping.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.