Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alimozdemir/vscode-linecounter
Line counter for visual studio code
https://github.com/alimozdemir/vscode-linecounter
linecounter vscode vscode-extension
Last synced: about 2 months ago
JSON representation
Line counter for visual studio code
- Host: GitHub
- URL: https://github.com/alimozdemir/vscode-linecounter
- Owner: alimozdemir
- License: mit
- Created: 2018-06-22T21:07:24.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-07T20:26:41.000Z (about 2 years ago)
- Last Synced: 2023-07-22T13:01:39.960Z (over 1 year ago)
- Topics: linecounter, vscode, vscode-extension
- Language: TypeScript
- Homepage:
- Size: 3.7 MB
- Stars: 11
- Watchers: 3
- Forks: 2
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Lines of code (linecounter)
This project is forked from [LineCount](https://github.com/yycalm/linecount) project. Author of the project is not resposing any PRs or Issue and he does not developed the extesion since 1 year. So, we have published the extension under a new name.
The Lines of code extension for Visual Studio Code counts and displays the lines of code, the lines of comment, the lines of blank.
[![Version](https://vsmarketplacebadge.apphb.com/version/lyzerk.linecounter.svg)](https://marketplace.visualstudio.com/items?itemName=lyzerk.linecounter)
[![Installs](https://vsmarketplacebadge.apphb.com/installs/lyzerk.linecounter.svg)](https://marketplace.visualstudio.com/items?itemName=lyzerk.linecounter)
[![Ratings](https://vsmarketplacebadge.apphb.com/rating/lyzerk.linecounter.svg)](https://marketplace.visualstudio.com/items?itemName=lyzerk.linecounter)
---
## Features
* Count the number of lines of current opened file.
* Count the number of lines of workspace files. Also, you can custom the includes/excludes file pattern.
* Support languages: c,cpp,java,js,ts,cs(`//,/*,*/`),sql(`--,/*,*/`),pas(`//,{*,*}`),perl(`#,=pod,=cut`),ruby(`#,=begin,=end`),python(`#,'''`),vb(`'`),html(``),bat(`::`),sh(`#`),ini(`;`),fortran(`!`),m(`%`).
* You can customize the comment symbol, add new languages support.
* Line number information can be output to JSON, TXT, CSV, Markdown file (MD).
## Installs
* ext install linecount
* Through Code
Download source code and install dependencies:
```
git clone https://github.com/lyzerk/vscode-linecounter.git
cd linecount
npm install
code .
```## Extension Settings
* `LineCount.showStatusBarItem`: (boolean|default `true`) Show/hide the status bar item for LineCount commands.
* `LineCount.statistics`: (boolean|default `true`) Collecting the statistics of the operation (e.g. Workspace files, Current file)
* `LineCount.includes`: (string array|default `"**/*"`) Search files pattern.
* `LineCount.excludes`: (string array|default `"**/.vscode/**,**/node_modules/**"`) files and folders that you want exclude them.
* `LineCount.output.txt`: (boolean | default `true`) Whether output to TXT file.
* `LineCount.output.json`: (boolean | default `true`) Whether output to JSON file.
* `LineCount.output.csv`: (boolean | default `false`) Whether output to CSV file.
* `LineCount.output.md`: (boolean | default `false`) Whether output to markdown file and preview.
* `LineCount.output.outdir`: (string | default `out`) output file path.
* `LineCount.sort`: (string enum | default `filename`) Specifies the sort field.
* `LineCount.order`: (string enum | default `asc`) Specify ascending or descending order.
* `LineCount.comment.ext`: (string array| required) file extension. if it`s "*", the rule for other files. default c style.
* `LineCount.comment.separator.linecomment`: (string |default none) Single line comment symbol.
* `LineCount.comment.separator.linetol`: (boolean |default `false`) Whether the line comment must be started on the line.
* `LineCount.comment.separator.blockstart`: (string |default none) Block start comment symbol.
* `LineCount.comment.separator.blockend`: (string |default none) Block end comment symbol.
* `LineCount.comment.separator.blocktol`: (boolean |default `false`) Whether the block comment must be started on the line.
* `LineCount.comment.separator.string.doublequotes`: (boolean |default `true`) String using double quotes.
* `LineCount.comment.separator.string.singlequotes`: (boolean |default `true`) String using single quotes.LineCount configuration examples:
```
"LineCount.showStatusBarItem": true,
"LineCount.statistics": true,
"LineCount.includes": [
"**/*"
],"LineCount.excludes": [
"**/.vscode/**",
"**/node_modules/**"
],"LineCount.output": {
"txt": true,
"json": true,
"csv": true,
"md": true,
"outdir":"out"
},
"LineCount.sort": "filename","LineCount.order": "asc",
"LineCount.comment":[
{
"ext": ["c","cpp","java"],
"separator": {
"linecomment": "//",
"linetol":false,
"blockstart": "/*",
"blockend": "*/",
"blocktol": false,
"string":{
"doublequotes": true,
"singlequotes": true
}
}
},
{
"ext": ["html"],
"separator": {
"blockstart": "",
}
}
]
```
## Usage
There are two commands available.
You can access them from the command palette (Ctrl+Shift+P on Windows/Linux), or click StatusBarItem 'LineCount'.
1. LineCount: Count current file:
![Count current file](https://github.com/lyzerk/vscode-linecounter/blob/master/images/countcurrentfile.gif?raw=true)
2. LineCount: Count Workspace files:
![Count workspace files](https://github.com/lyzerk/vscode-linecounter/blob/master/images/countworkspace.gif?raw=true)
## Support
[Repository](https://github.com/lyzerk/vscode-linecounter)
# License
MIT
-----------------------------------------------------------------------------------------------------------
**Enjoy!**