Skip to content

v2.0.0

Compare
Choose a tag to compare
@Alhadis Alhadis released this 29 Dec 14:35
· 870 commits to master since this release
v2.0.0
e5bb2f8

New features

Hashbang and modeline recognition

Interpreter directives and modelines are now detected inside file headers, even before they're opened:

Figure 1: Headers and Modelines

Support for custom file-types

If your config defines custom language types, the mapped extensions will now show icons appropriate for their languages. If you work with MATLAB, for example, you might prefer .m files use its icon instead of Objective-C's:

"*":
    core:
        customFileTypes:
            "source.matlab": ["m"]

Figure 2: Custom filetypes

Improved pattern-matching

JavaScript and regular expressions now power the package's file-matching logic. The most visible improvements are:

  • Case-insensitive matching:
    .html, .HTML or .hTmL are all matched the same.
  • Icons for popular frameworks/libraries:
    Accurately matching filenames like jQuery-1.7.2.js or knockout-3.4.0.min.js is infeasible in CSS. Conversely, this is trivial to achieve with regular expressions.
  • Filtering of generic/junk suffixes:
    Certain suffixes (e.g., .tmp) commonly tacked onto filenames are ignored when matching. index.html.tmp will show an HTML icon instead of nothing at all.
  • Better fallbacks:
    Having each match-rule ordered by an explicit priority enables safe guesswork to be used as a last resort. E.g., .dotfiles show a gear instead of the usual blank-page icon, since they're likely to be config files.

Language-specific icons

Manually assigning a file's language will also update its icon:

Figure 3: Language-specific icons

Icons can also be set on a per-file basis using a .gitattributes file. These files are checked for linguist-language attributes, which enable authors to correct their repository's classification on GitHub:

*.h linguist-language=C++
*.t linguist-language=Terraform

More information may be gleaned from Linguist's documentation.

Signature recognition

If nothing else matches a file, its data is checked for a recognised file signature. The package will recognise images or videos that were saved without their proper file extension:

Figure 4: Magic number recognition

More importantly, binary-type files are identified as such, making it somewhat easier to tell which files are safe to open:

Figure 5: Binary-type file detection

Optimised icons

The Devicons and MFizz fonts have been cleaned up and optimised to use consistent metrics. The improved fonts are much more uniform in size and alignment:

Devicons → DevOpicons:

Figure 6: Devicons → DevOpicons

MFizz → MFixx:

Figure 7: MFizz → MFixx

For those wondering: Yes, I really did clean 298 icons by hand in Adobe Illustrator. I never claimed to be sane.

New icons

Figure 8: Icon previews

Note: GN and Ninja's icons were created for this package; the projects have no logos of their own.

Support for new filenames/extensions

  • HTML: .vash, .xhtml
  • Source maps: .css.map, .js.map

Other