Word count in Status Bar on text selection
-
Hello,
Question 1: Is there a way to select a paragraph and see the corresponding word count (and character count) in the status bar?
Question 2: If there is no way to do Q1, then, is it possible to see a word count for all text in the tab in the status bar? (just like I see the char count)
-
The direct answer to both questions is No.
Although it isn’t constantly on-screen, one thing you can do to obtain some of the information (word count in the entire document) on-demand is to use the View menu’s View Summary feature.
If you are willing to use a scripting plugin, then you can get closer to what you want, all around, but still on an on-demand basis.
There’s a PythonScript HERE that, when run, will show you the number of words in your text selection and output it in a message box. To obtain a word count for the entire document, simply Select All (Ctrl+a) before running the script.
If you are going to pursue the scripted solution, have a read HERE to learn about how to do scripting.
Side note: In theory, the scripting plugin could update the status bar to provide fully what you want, but there is a long-standing bug in the plugin regarding selected text and screen updates; see HERE.
-
-
If you go to the bottom of this issue in the Notepad++ GitHub repo, you will find a script I wrote that does everything you’re asking for.
-
Hello, @michelle-pace,
You may also be interested by this Python script, built up with the @alan-kilborn’s collaboration and some other Python gurus !
On the last line of this
Summary
report, it will give you, at the same time, the number of characters, words and bytes of all your selected text, in one or several ranges, of the current file, whatever the view used !Of course, if you select all the file contents, the results, reported in the last
SELECTION(S)
line, should be identical to the3
lines just above :
Total chars
,Words count
andBuffer length
BTW, note, that I added the mention
(Caution !)
in theWords
line, because the word notion is quite odd in many languages ! Refer to this post :
If needed, you may even change the default definition of a word character, as explained at the beginning of the post !
Best Regards,
guy038