Inconsistent behavior of ggkn in incremental search compared to Vim
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
- Open a page with multiple occurrences of a search term.
- Use /pattern to start an incremental search.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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