Skip to content

yuri0sh/code-size

Repository files navigation

Display of file size

A simple yet astonishingly useful extension for VS Code and GitHub.
Use it to build to build understanding of unfamiliar codebases.

Motivation

There are many extensions like this. Why make a new one?

What makes this one unique is its compatibility with Remote Repositories and browser homed vscodium editors.
The main goal was to be able to open any repo in github.dev (hotkey: . on the repos page) and get a quick overview of the entire project.

Files and folders that are more important tend to be larger in size. You can get a good heuristic of what the repository is all about just by looking at it topologically, without spending much time manually going through the files or having to download it.

should be a github feature tbh

Features

  • Folder view, grouped by extension view, flat file view, sorted by total size

  • Cumulative folder file count

  • Powerful select / filter system

    Select files, folders and extensions to ignore, exclude paths with regex, blacklist them, whitelist them, via UI or with JSON, or never touch this feature, doesn't matter, it's there

  • Works with remote repositories

  • Works in browser github.dev and vscode.dev (and other codium editors)

  • In theory, supports any resource protocol / virtual file system provided by other extensions

Settings

  • size.folderContentCount - toggle file count for folders

  • size.compactFolders - flatten folders that only contain one child

  • size.defaultTreeType - sets default "View As..."

  • size.foldersFirst - gives priority to folders when sorting even if folders are smaller than files

  • size.fileSizeUnits - toggle between base-2 (Windows, ISO/IEC 80000-13) and base-10 (SI) file size units

  • size.fileSizeLabel - whether to show file sizes as labels or as descriptions in a tree view

Coming soon

More advanced filtering options

Similar explorer for document symbols size (à la document outline view), but count lines instead

Options to view and sort by file change rate, as reported by git log -- (inspired by File Change Count)

Known Issues

Files stored with Git LFS are not counted properly (worth parsing .gitattributes over?)

GitHub remote repositories are limited to 100,000 files (GitHub API limitation)

Enjoy!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published