npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

joplin-plugin-search-match-count

v1.0.0

Published

Shows the number of search matches (e.g. 3/17) in the Markdown editor's search panel.

Downloads

543

Readme

Joplin Search Match Count

Restores the search match counter — 3/17 — in Joplin's Markdown editor search panel.

Why

Joplin's "search in current note" used to show a tally of matches. It disappeared around v3.2.12, when Joplin migrated from CodeMirror 5 to CodeMirror 6: the stock CodeMirror 6 search UI has no counter, and Joplin adopted it as-is.

The gap is still open — there is a forum request from April 2025, and nothing in the desktop changelog through v3.7.x restores it. The only workaround offered is reverting to the legacy CodeMirror 5 editor.

This plugin adds the counter back to the existing panel, so Ctrl+F keeps working exactly as it does now — just with the number you're missing.

Install

From the .jpl: build it (below), then in Joplin go to Tools → Options → Plugins → gear icon → Install from file and pick publish/com.aronwu.search-match-count.jpl.

For development: Tools → Options → Plugins → Advanced and add this repository's path to Development plugins.

Build

npm install
npm run dist     # builds dist/ and publish/<id>.jpl
npm test         # runs the counting logic against real CodeMirror

How it works

CodeMirror 6 only computes search highlights for the viewport, so there is no built-in total to read — the information genuinely does not exist until someone scans for it. This plugin uses the approach recommended by CodeMirror's maintainer: run SearchQuery.getCursor() over the document and tally the results.

That scan is the whole cost of the feature, so it is kept cheap:

  • Debounced by 150ms, so typing a query does not rescan on every keystroke.
  • Capped at 999 matches, displayed as 999+. On a 1.2MB note this is the difference between 2ms and 81ms per scan.
  • Skipped entirely unless the query, document length, or selection changed, and while the search panel is closed.

The counter is inserted next to the panel's navigation buttons rather than appended at the end, which would push it onto a second row when the replace field is visible. It carries aria-live="polite" so screen readers announce updated counts without focus leaving the search field.

On the legacy CodeMirror 5 editor the plugin does nothing — that editor still has its own counter.

Scope

This covers the match counter only. Scrollbar tick marks showing where matches sit in the document (as VS Code does) are a separate feature: CodeMirror 5's annotateScrollbar was never ported to v6, and per CodeMirror's maintainer it needs a custom overlay along the editor's right edge rather than real scrollbar annotation.

License

MIT