philc / philc/vimium

Inconsistent behavior of ggkn in incremental search compared to Vim

Open
#4,771 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
27k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

The behavior of ggkn during incremental search is inconsistent with Vim.
In Vim, ggkn jumps to the n-th match in the entire buffer.
In Vimium, ggkn instead starts counting from the last match reached by n, rather than from the beginning of the buffer.

To Reproduce

  1. Open a page with multiple occurrences of a search term.
  2. Use /pattern to start an incremental search.
  3. Run ggkn (where k is a number).

Include a screenshot if applicable.

Browser and Vimium version

Firefox

Name Firefox
Version 143.0.1
Build ID 20250918214338

Vimium

Vimium Version: 2.3
Last Updated August 16, 2025

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 locating Vimium's incremental-search handling and the key-sequence entry point for /pattern followed by ggkn. Compare the current match-counting behavior with Vim's whole-buffer counting, then verify that the n-th match is selected from the beginning of the buffer when the issue's reproduction steps are run.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
web-dev
Issue type
Bug
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.