Word counter plugin for JetBrains IDEs

For other weirods like me who like their tools

An image of the word counter plugin

People tend to use familiar tools. Once a developer has spent a significant amount of time tweaking Vim for their needs, they won’t ever give up on it. Eric Roth, screenwriter of “Dune” (2021), “Forrest Gump” and “The Curious Case of Benjamin Button” works in MS-DOS software. George R.R. Martin, “Game of Thrones” author, uses WordStar, another MS-DOS word processor to write his books.

Me? I work on this website in WebStorm – a JetBrains IDE for web development. And since all my blog posts are written in Markdown format, I don’t need rich-text editing or WYSIWYG capabilities. It’s a plain text in its nature. However, I do miss one thing from traditional word processors — a word counter. While I was typing my first post, I noticed that it was getting longer than I’d expected.

It made me curious.

I instinctively glanced at the status bar but only saw the current line and column position. The desire to find out how many words I’d written was so burning that I copied all the text and ran pbpaste | wc in the terminal. It worked as expected but wasn’t very convenient. On top of that, I was interested in those numbers from a reader’s perspective. A one hundred character URL, an equivalent of about 17 words, is not visible in the final post. I needed a tool that would be aware of the Markdown format. So I searched…

To my surprise, there wasn’t such plugin on the Marketplace. Had I stumbled upon this problem earlier, I would have shrugged it off and moved on. But nowadays, it seemed like a perfect task for AI-assisted coding… So here it is, meet Word Counter plugin!

You can install Word Counter from JetBrains Marketplace.

You can also download the plugin file or build it from source from the GitHub repository.

Key features:

  • Triggers only on file change and for the active window
  • Supports .md, .mdx and .txt files, ignoring others
  • For .md and .mdx files, it counts only the text content, ignoring code blocks and frontmatter
  • Supports text selection for counting
  • Has configurable update delay and whitespace counting checkbox