Skip to content

Latest commit

 

History

History
85 lines (52 loc) · 2.85 KB

README.md

File metadata and controls

85 lines (52 loc) · 2.85 KB

VSCode zoneinfo

A Visual Studio Code extension that adds syntax highlighting and smart navigation for IANA time zone database files (a.k.a. zoneinfo files).

Also available as a package for Sublime Text.

Installation

Find it as Zoneinfo in the Visual Studio Marketplace. Within VSCode you can search for Zoneinfo in the extensions sidebar.

Syntax highlighting

Syntax highlighting is provided for the raw time zone definition files:

  • africa
  • antarctica
  • asia
  • australasia
  • backward
  • backzone
  • etcetera
  • europe
  • factory
  • northamerica
  • pacificnew
  • southamerica
  • systemv

As well as associated metadata files:

  • iso3166.tab
  • leap-seconds.list
  • leapseconds
  • zone.tab
  • zone1970.tab

Example screenshot

Preview of syntax highlighted file

Definition navigation

This plugin provides support for smart navigation within the time zone definition files (listed above).

Go to symbol

Use the go to symbol feature for a single file, or the whole tz directory. “Symbol” here means any Link, Rule, or Zone definition.

Find symbols within a single file:

Example of using the “go to document symbol” feature

Find symbols within the tz directory/workspace:

Example of using the “go to workspace symbol” feature

Go to definition

Click-through support between definitions is handled with the go to definition feature. Specifically, you are able to go from a Link to a Zone, and from a Zone to a Rule.

Example of using the “go to definition” feature

Find all references

This is the reverse operation of “go to definition”. Find all references across the workspace to a Rule or Zone definition.

Example of using the “find all references” feature

Code folding

All multi-line symbols (Rule and Zone statements) and comment blocks can be folded to reduce clutter.

Example of the code folding feature

Development

The syntax highlighting rules are defined by the zoneinfo.tmLanguage file, which was generated by the sublime-zoneinfo package.

For consistency, any changes to syntax highlighting should be made in sublime-zoneinfo first, then copied to this extension.

Credits

This code is open source under the MIT license – © Gilmore Davidson.