kirozen / vsce-wordcounter Goto Github PK
View Code? Open in Web Editor NEWWordcounter for VSCode
Home Page: https://marketplace.visualstudio.com/items?itemName=kirozen.wordcounter
License: MIT License
Wordcounter for VSCode
Home Page: https://marketplace.visualstudio.com/items?itemName=kirozen.wordcounter
License: MIT License
Currently, as of version 1.9.2, whenever a multi-selection is done it counts each selection as a different paragraph. For example, if you have 3 selections on a single line, WordCounter counts that as 3 paragraphs. And 3 selections on 3 different lines within the same paragraph, likewise, get counted as 3 paragraphs.
My expectation is that multiple selections within a single paragraph, whether those selections are on the same line or on different lines, should count as 1 paragraph. And multiple selections done across 2 different paragraphs should count as 2 paragraphs, etc.
It would be nice if there was also a paragraph counter. So, for example, the below text would show as '3 Paragraphs'.
Line 1.
Line 2.
Line 3
Line 4.
Sublime will report back the word count stats based on either the whole document, or the selected text.
What do you think about adding in support so we can get a count report on selected text?
Behavior wise, it could work as is if you don't select anything, but when you select any amount of text, it will report back the stats on just the selected text.
Hi can you push your extension to https://open-vsx.org/ in addition to VSCode Market Place so people using the FLOSS version could install it too?
I wrote an article on the subject.
Example of Github Action: https://github.com/HaaLeo/publish-vscode-extension
It would be nice if there was an option for whether LF and CRLF characters were counted as part of the character count.
In v2.0.0, there is something strange with the counting of paragraphs.
Start a new, blank file.
Paragraph count is 0 (expected).
Press Enter.
Paragraph count is 1 (not expected).
Press Enter.
Paragraph count is 0 (expected).
Is it currently possible to selectively enable this extension for certain language modes? I'd like to have it operate on text and Markdown files, but hide on all other languages.
(Thank you for a useful extension!)
The sentence ""Images of x-rays"" is counted as 4 words, most word counting programs (word, wc
command line utility) would count this as 3.
Similarly: "I won't" and "I will not" are both counted as 3 words, the former should be 2.
Frequently, I quickly select a paragraph of text to find out how many words are in that paragraph.
With v2.3.0, I've tested this and found that I get inconsistent answers.
With a paragraph that actually contains 104 words, I've found that if I quickly drag select the entire paragraph, I get a different answer each time: e.g. sometimes it tells me 103 words, sometimes 102 words, sometimes 104 words, sometimes 1 word, etc.
Below is a screenshot where I've quickly selected the entire paragraph of 104 words, but I'm being told that it only containts 68 words.
Hi,
You mentioned drawing inspiration from SublimeText WordCount.
What do you think about adding a label for showing the estimated read time?
You could expose it as an option along with a "wpm" (words per minute) option that defaults to 200 just like the sublime package.
In WordCounter 1.9.3 groups of characters that don't contain letters or numbers are also counted as words. For example, this now gets counted as 5 words when I believe it should get counted as 3 words:
one - two ; three
Different programs handle this differently, but in my opinion the rule should be: if a group of characters contains either letters or numbers, then count it as a word. If a group of characters doesn't contain any letters or numbers, it's not a word.
It seems there are 2 different sets of bugs. From what I can tell, the fixing of one of these set of bugs causes the other set of bugs. The past several versions have gone back and forth in this manner, fixing and breaking.
In the current version, v2.4.1, Set 1 is broken. I hope it will be possible somehow to fix Set 1 without breaking Set 2.
When highlighting text in a document, the status bar does not update with the count of the selected words. It does show the entire word count for the document, but specific word counts are needed.
Great plugin
I have reading time set to 145 (for voiceovers). When i am still approaching 145, reading time should be less than 1 minute. It looks like the seconds are accurate, but 1 min is added to it. So when there are 50 seconds on content, it will read 1 min 50 seconds. Every thing is accurate after it reaches 1 minute
After selecting some text, if you then click somewhere else in the document to clear the selection, the stats from the previous selection become stuck in the statusbar, i.e. the stats don't get reset to showing the stats for the whole document again.
Hey, I have a weird issue. Whenever I enable Spell Right, WordCounter stops working. Sometimes I still see the count for selection, at other times nothing. If I disable Spell Right, WordCounter works fine. This started first happening when I tried to enable spellcheck for a document.
I can no longer see any wordcounting in vs code 1.29.0.
The character count doesn't update immediately when toggling between LF and CRLF.
Previously reported in Issue #3 and it's back again in v2.2.0
Previous reported in #7
and it was fixed at the time.
Unfortunately, this same problem is back again in v2.1.0
Originally posted by @Eldaw in #7 (comment)
How to disable showing reading time and # of paragraphs?
Word-counting is slow and on large files it causes the editor to lag. Two suggestions:
It would be amazing if this extension could also count images, although I understand this is a fairly niche request!
I use VSCode to write books in asciidoc and, along with a page count (see page count feature request), I would love to see the count of the asciidoc images in the file. This is because I use this to calculate the number of pages my book will be due to images taking up roughly half a page, i.e. if I have a page count and an image count I can easily calculate this using pages + (images/2).
I was thinking that this could be expanded to include images in markdown and html to make it less niche, with images in these and asciidoc having a specific syntax.
Many thanks for a very useful extension! :)
Reporting stats on selected text using WordCounter is great, however it currently doesn't support multiple selections.
Currently, if you create multiple carets by holding Alt and then clicking in different parts of the text, then hold Shift and use the arrow keys to select a few characters in the multiple locations, WordCounter doesn't recognize that there are multiple selections.
VS Code itself, with it's built-in functionality, shows some stats for the multiple selections on the statusbar though. (e.g. 2 selections, 8 characters selected).
Steps to reproduce:
Using the 'Backspace' key seems to work fine, but not the 'Del' key.
It would be nice to have a toggle-able option to only count non-space characters, and ignore characters like spaces, tabs and newlines.
Words consisting only of numbers don't get counted as words. For example, a sentence such as this:
They sell 75 different products.
currently gets counted as 4 words instead of 5. For essay writing purposes, and as far as other software (e.g. MS Word) is concerned, that sentence consists of 5 words.
Some more examples:
The following should count as 3 words:
Item 06: 87,334.67
The following should count as 5 words:
Account 12345678, Sort Code 01-02-03
The "Words" counter get stuck sometimes and stops updating the word count. The "Chars" counter still continues to work and correctly register any changes.
Test file (rename the file to .md
before testing):
test-file.md.txt
Version: 1.32.0-insider
Commit: 393b48d4a5de85b6fa1d2ad0a59588d6715e12ea
Date: 2019-02-25T01:34:48.785Z
Electron: 3.1.3
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.17763
When I open a new file, tool says zero words, etc as it should. If I type, it counts in real time. If I paste text, nothing. Selecting text also does nothing. No entry in the status bar at all.
Test sentence:
один два ёлка
Current result:
0 Words
Expected result:
3 Words
When toggling line endings from CRLF to LF and vice versa, the character count doesn't update immediately. It only updates later when you next move the cursor.
Test sentence:
Tecnología
Current result:
2 Words
Expected result:
1 Word
The text on the status bar updates correctly when going from 1 to 2 (i.e. 'word' to 'words' and 'char' to 'chars'), but for 0 it should be 'Words' and 'Chars'.
In a similar fashion to reading time with its words per minute setting, it would be great to have a calculated page count, based on a number of words per page variable in the settings.
I use VSCode to write books in asciidoc, and find this extension very useful. Adding page count would make it almost perfect. Thank you :)
(I have one other wish, but I think that would be too language-specific, which is counting the number of asciidoc images in the file. Although I suppose counting images in asciidoc, markdown and html would be not too much to ask... I'll add another feature request and see what comes back.)
As a writer, I sometimes leave notes to myself in comments (using <!-- HTML comment markup -->
so they are not in the final product. This text should not be counted in the word count.
Not sure how hard this would be to implement or whether this warrants a separate plugin altogether.
I'd love to see a session word count, that spans multiple files and gives a result once the session is ended.
If you start a new empty file and hit Enter a few times to get multiple blank lines, WordCounter 1.9.3 counts only 1 line.
Of late, vscode keeps showing the notification that wordcounter
has taken lot of time to load and in this process has stalled other extensions from loading. Thought of bringing it your notice.
VSCode has created a txt file having some analytics. I am attaching the file.
kirozen.wordcounter-unresponsive.cpuprofile.txt
Also, vscode pointed to this link for the details about cpu-load
Linux x64 4.19.13-1-MANJARO
1.30.1
Thanks for making this excellent tool! I wonder would it be possible to implement functionality to exclude certain parts in a document, I am in particular thinking about a YAML front matter section in Markdown, and also the preamble part in a LaTeX document.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.