Giter Site home page Giter Site logo

uctakeoff / vscode-counter Goto Github PK

View Code? Open in Web Editor NEW
145.0 0.0 20.0 2.41 MB

VS Code extension: counts blank lines, comment lines, and physical lines of source code in many programming languages.

License: MIT License

TypeScript 100.00%
vscode vscode-extension typescript

vscode-counter's Introduction

VScode Counter

VS Code extension: counts blank lines, comment lines, and physical lines of source code in many programming languages.

This extension uses other language extensions to determine the line of code.Therefore, you may need to install the language extension to support a new language.

Conversely, as the number of language extensions increases, the range of support for this feature also increases.

Used in the wonderful extension CodeViz Stat!

CodeViz Stat allows you to see the results of your statistics in beautiful graphs.

Features

  • Count the code lines of source code in workspace or directory.
  • Count the code lines of the current file in real time.

Usage

Count in workspace

  • Open the command palette and select VSCodeCounter: Count lines in workspace.

Count in any directory

  • Open Explorer and right click on the folder.

  • Select Count lines in directory.

Real-time counter

  • Open the command palette and select VSCodeCounter: Toggle Real-time Counter Visibility.

  • Count the range of the selected text

Check available languages

  • Open the command palette and select VSCodeCounter: Check available languages.

    • Available languages can be increased by adding language extensions.

Save language configurations

VSCode Counter is able to aggregate in unknown languages by referring to the information in the installed language extensions. However, I found out that this information is not available in Remote Development.

Therefore, VSCode Counter's ability of collecting VSCode language extensions is now called as an independent function. The idea is to collect the information once in the local environment and store it so that it can be used remotely.

  • First, launch VSCode on your local.
  • Then, open the command palette and select VSCodeCounter: Save the collected language configurations.
  • Then settings.json will store the configuration information collected from the current language extensions .
  • Connect to the remote and use the VSCodecounter as usual.

You can also change the location where your configurations are stored. However, you must carry the stored information to the remote environment by yourself.

Extension Settings

  • VSCodeCounter.useGitignore: Whether to use '.gitignore' files for excluding files.
  • VSCodeCounter.useFilesExclude: Whether to use setting 'files.exclude' for excluding files.
  • VSCodeCounter.maxOpenFiles: Maximum number of files that VSCodeCounter can read simultaneously.
  • VSCodeCounter.printNumberWithCommas: Whether to print a number with commas as thousands separators.(except for CSV)
  • VSCodeCounter.ignoreUnsupportedFile: Ignore unsupported files.
  • VSCodeCounter.endOfLine: A new line character to be used in the output file.
  • VSCodeCounter.include: Configure glob patterns for including files and folders.
  • VSCodeCounter.exclude: Configure glob patterns for excluding files and folders.
  • VSCodeCounter.outputDirectory: Directory path for outputting results.
  • VSCodeCounter.outputAsText: Whether to output the result as a text file.
  • VSCodeCounter.outputAsCSV: Whether to output the result as a CSV file.
  • VSCodeCounter.outputAsMarkdown: Whether to output the result as a Markdown file.
  • VSCodeCounter.outputPreviewType: Type of output file to preview after counting. Choose from text, csv, markdown, diff-text, diff-csv, diff-markdown or none.
  • VSCodeCounter.saveLocation: Specify where to store the collected language configurations.
  • VSCodeCounter.history: Controls the number of recent result to keep in history.

Enjoy!

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.