rizonesoft / Notepad3

Notepad like text editor based on the Scintilla source code. Notepad3 based on code from Notepad2 and MiniPath on code from metapath. Download Notepad3:
https://www.rizonesoft.com/downloads/notepad3/
Other
4.79k stars 322 forks source link

Feature request: Word count #5138

Closed masterrite closed 3 months ago

masterrite commented 4 months ago

Hi - is there a way to se how many words there are in a text document? Can I request this feature to be added, please? Thanks.

masterrite commented 4 months ago

Maybe like Notepad++'s "Summary" ? 🤔

NP++_Summary

Yes, a feature like that would be great. Thanks.

RaiKoHoff commented 4 months ago

Using Search (RegEx '\w+', Mark Occ.) or (not RegEx '*', wildcard, Mark Occ., match whole word only)

image

or

image

masterrite commented 4 months ago

Using Search (RegEx '\w+', Mark Occ.) or (not RegEx '*', wildcard, Mark Occ., match whole word only)

That does help, thanks! But I think having a dedicated button for a summary or a word count in the status bar would be more convenient. Thanks again!

masterrite commented 4 months ago

Also, searching for \w+ and * seems to not count conjunctions like "it's" and hyphenated words "two-week-long" "y-you" as a single word. This doesn't seem to be the case in other processors like word or ghostwriter.

hpwamr commented 4 months ago

searching for \w+ and * seems to not count conjunctions like "it's" and hyphenated words

As workaround, a simple solution is to replace all ' and - by "(nothing)" before counting the words. 🤔

RaiKoHoff commented 4 months ago

Using the RegEx:

\w stands for "word character", usually [A-Za-z0-9_] - so also numbers und underscore.

For your purpose, you may flexible extend the RegEx: use [\w'-]+ instead - add word-chars you also want to be recognized.

Notepad3 identifies itself as a source-code editor and not as a word-processor, even if a source-code editor shares some aspects of word-processing. For a source-code editor, a summary of word statistics is of no mean to a developer.