Giter Site home page Giter Site logo

vsce-wordcounter's People

Contributors

furiouzz avatar kirozen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

vsce-wordcounter's Issues

Multiple selections count each selection as a separate paragraph

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.

Add a counter for paragraphs

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.

Adjusting the word count based on selection

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.

Counting of paragraphs in new, empty file

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).

only enable for certain language modes?

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!)

Hyphenated words / contractions counted as two words

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.

Quickly selecting a paragraph doesn't always count its words accurately

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.

image

Thoughts on adding estimated read time?

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.

Non-words are counted as words

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.

Fixes for 2 sets of bugs are mutually exclusive

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.

Set 1:
#3
#33

Set 2:
#34
#35

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.

Reading time below 1 min is off by up to 1 min

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

Wordcounter stops functioning when Spell Right is enabled.

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.

Make async and/or trigger onsave

Word-counting is slow and on large files it causes the editor to lag. Two suggestions:

  1. Maybe using async/await would help.
  2. Add a configuration that let's the user choose to update word count on save vs. on text change.

Feature request: image count

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! :)

Support multiple selections

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).

Number of lines doesn't update when using the 'Del' key

Steps to reproduce:

  1. In a new blank file, hit Enter several times to create several blank lines.
  2. Go to a blank line half-way in the document.
  3. Delete some lines using the 'Del' key.
  4. Notice that the number of lines doesn't update.

Using the 'Backspace' key seems to work fine, but not the 'Del' key.

Numbers are not counted as words when they should be

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

Words counter stuck and not updating

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

only works on typing, not pasted text

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.

Feature Request: Page count

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.)

Counting Commented test

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.

Feature request

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.

Extension causes high cpu load

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

  • OS Version: Linux x64 4.19.13-1-MANJARO
  • VSCode version: 1.30.1

Exclude YAML front matter / LaTeX preamble?

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.