VSCodeVim / VSCodeVim/Vim

hlsearch Turns On Unexpectedly When Executing Some EasyMotion Shortcuts

Open
#9,381 0 comments 1 reaction 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

Describe the bug
When I execute any of the easymotion commands (<leader><leader>s, <leader><leader>f, etc.) after performing a search and hiding the highlights using :nohl, the hlsearch setting is automatically turned back on, causing the search highlights to reappear.
CleanShot 2024-12-07 at 17 00 58

To Reproduce
Steps to reproduce the behavior:

  1. Open a file in VSCode with the Vim extension and easymotion enabled.
  2. Perform a search (e.g., type /search_term and press Enter).
  3. Hide the search highlights by typing :nohl and pressing Enter.
  4. Execute one of the following easymotion commands:
    • <leader><leader>s<char> (Search character)
    • <leader><leader>f<char> (Find character forwards)
    • <leader><leader>F<char> (Find character backwards)
    • <leader><leader>t<char> (Till character forwards)
    • <leader><leader>T<char> (Till character backwards)
  5. Notice that the search highlights reappear automatically.

Expected behavior
The hlsearch setting should remain off after executing easymotion commands, and the search highlights should not reappear unless manually enabled.

Environment

  • Extension (VsCodeVim) version: v1.28.1
  • VSCode version: 1.95.3
  • OS: macOS Sequoia 15.1.1
  • Hardware: MacBook Pro M3 Pro

Additional context
Vim provides various navigation methods, but I believe f, as an advanced version of f, is the fastest and most intuitive way to navigate in Vim. I am eagerly looking forward to its improvement!

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

Start by reproducing the issue with :nohl followed by the listed EasyMotion shortcuts, then trace the EasyMotion command handling and its interaction with the hlsearch setting. Done means each listed shortcut leaves hlsearch off and the existing search highlights hidden until the user enables them again.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.