/time-in-editor

A very basic time-tracking VS Code extension

Primary LanguageJavaScript

About

This just tracks how long the editor was active for.

I know these extensions exists, I wanted to learn how to make my own.

Uses vscode.window.state (focused or not)

This is using setInterval every second it checks if the window is focused, if it is, stores a second/adds to total time displayed by calling Time In Editor via command palette.

To compile

Have @vscode/vsce package installed globally, vsce package, then install by right of extension search, install by VSIX option

Resource

Based on this VS Code extension sample code

sample code