Counts the number of lines of code written in each file, number of deletions, and total number of lines of codes written. It also provides a command to reset the line counter.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
A VSCode extension that allows you to track the number of lines written, deleted, and modified in real-time as you code. Code Line Counter helps you measure your progress by showing how many lines of code have been added or deleted across all open files in your workspace.
Features
Real-time line counting: Displays the number of lines written and deleted in the current file.
Total workspace statistics: View the total lines of code written and deleted across all open files in the workspace.
Reset functionality: Reset the line count for the current file at any time.
Persistence: Counts are saved and restored between VSCode sessions, allowing for continuity across different coding sessions.
VSCode Status Bar Integration: View current file line counts right in the status bar for quick access.
Commands
The following commands are available in the extension and can be triggered via the VSCode command palette or bound to custom keybindings.
lineCounter.reset: Resets the line count for the current file.
lineCounter.showTotal: Displays a notification with the total number of lines written and deleted across all files in the workspace.
lineCounter.showDeleted: Shows the number of lines deleted in the current file.
lineCounter.showTotalFile: Displays the total number of lines written in the current file.
Status Bar Integration
Once activated, the extension will display the following information in the VSCode status bar for the current active file:
Lines Written: X: Shows the number of lines written in the currently open file.
To-Do
The following tasks are planned for future releases of Code Line Counter:
[ ] Comprehensive test cases: Add a full suite of test cases to ensure the extension's reliability and coverage.
[ ] Reduce scope to project rather than IDE: Focus line counting to specific projects within a workspace rather than all files open in the IDE.
[ ] Store details as analytics: Store line count and file statistics as analytics for further tracking and visualization.
[ ] Ignore comments: Add a feature to exclude lines of comments from the line count.
[ ] Ignore imports: Exclude import statements from the line count.
[ ] Ignore boilerplate code: Ignore common boilerplate code sections, such as license headers, from the line count.