Does N++ currently have a word count function? I like to use the editor to help me flesh out story ideas and a word count function would be very helpful for me. If there is not specifically defined function like this, is it possible to simulate it?
Edit: See correct answer in Alan’s reply.
No built-in function, but this should work: Select Search | Find… Enter:
and be sure Regular expression is selected at the bottom;
then click Count.
Potential errors in this method: Words with internal hyphens, apostrophes, diagonals or other punctuation will be counted as multiple words. Numbers will be counted as words; if they contain commas or periods, as multiple words. Edit: I made that more difficult than necessary.
works by counting every string of characters that doesn’t include a space or a line break as a word. That’s probably what you want. (Note that is a capital S.)
See my response to issue #1336, which is the Notepad++ issue in which someone first asked for such a feature.
A count of words is available in the View menu’s Summary command.
@mark-olson, I suppose that, in your recent
wordcount.pyscript, on GitHub, the part :
curline = editor.lineFromPosition(curloc) curcol = editor.getColumn(curloc)
should be changed as :
curline = editor.lineFromPosition(curloc) + 1 curcol = editor.getColumn(curloc) + 1