vscode-counter icon indicating copy to clipboard operation
vscode-counter copied to clipboard

Real time counter for workspace

Open bernardoadc opened this issue 4 years ago • 2 comments

Create option to choose wheter real time counter is for current file or whole workspace (all file extensios). Futurely, file extensions could be chosen too.

bernardoadc avatar Nov 06 '19 04:11 bernardoadc

That's an interesting idea. If the counter is always counting, the load will be high, so I think that it is good to make the whole count only the first time and then only the file being edited. However, if you do so, the edits made in other editors will not be reflected, but is there any better way?

uctakeoff avatar Nov 06 '19 14:11 uctakeoff

That's a good point. (but wouldn't that be a rather uncommon situation?)

I can only think of two solutions:

  1. watch file updates. This can also be costly, so I thought about vscode events who should already monitor project's file tree. I don't know much about that, but couldn't find it here at least: https://code.visualstudio.com/api/references/activation-events

  2. time delays. Check all files at regular intervals, which could possibly be long enough by default, and maybe configurable (if it doesn't compromise extension by adding yet another setting).

If I may add another suggestion in this issue (I know I'm stretching the line here), I think real time line count of current file is good but could easily be seen manually. What could be more useful, IMHO, are blank and comment counts for the current file. That would be a pain to do manually. So two modes for user to choose from: real time whole workspace line count, or real time blanks and comments line count for current file.

bernardoadc avatar Nov 07 '19 13:11 bernardoadc