Can Dataview give a live word count of individual codeblocks?

What I’m trying to do

Preparing questionnaire responses for job applications that each have to be under a certain word limit– Trying to minimize the amount of time I spend checking and re-checking word count for each individual one– Which can be annoying because I prepare multiple ones within the same document, so can’t just word count the whole document. The ideal would be to have a live word count for each section above each section. Composing them in code blocks to make for easy copying-and-pasting into the web form I submit them through.

Things I have tried

I’ve done a bunch of searching but am not sure if this is a thing dataview can do or not. Hard to say as I’m quite a novice at it currently.

I think there are plugins which are able to show word counts (and some other statistics) for the current selection. That might be worth checking out.

Another option could be to implement it using Templater and some dependency on either the clipboard or selected text.

An even fancier solution would be to have a button which scans the current file from current location, locates the code block and does the counting. How hard that would be to program remains to be seen, but I do believe it’s doable (if you know coding).

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.