Skip to content
/ vzit Public

Uses `zig fmt` to format Zig code while allowing for tab indentation and diff viewing.

License

Notifications You must be signed in to change notification settings

ttytm/vzit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VZiT

Uses zig fmt to format Zig code while allowing for tab indentation and diff viewing.

Quick Start

Feature Overview

  • Use tabs with zig fmt under the hood (no need to miss out on the amazing work that goes into it).
  • View diffs with your preferred tool.
vzit-preview.mp4

Usage

Usage: vzit [flags] [commands] <path>

Formatter and diff viewer utilizing zig fmt.
By default, formatted output is written to stdout.

Flags:
  -w  --write         Modifies non-conforming files in-place.
  -l  --list          Prints paths of non-conforming files. Exits with an error if any are found.
  -d  --diff          Prints differences of non-conforming files. Exits with an error if any are found.
                      - The 'VZIT_DIFF_CMD' environment variable allows setting a custom diff command.
  -i  --indentation   Sets the indentation used [possible values: 'tabs', 'smart', '<num>'(spaces)].
                      - tabs: used by default.
                      - smart: based on the initial indentations in a file.
                      - <num>: number of spaces.
  -h  --help          Prints help information.
  -v  --version       Prints version information.

Commands:
  update              Updates vizit to the latest version.
  help                Prints help information.
  version             Prints version information.

Disclaimer

Maintaining quality throughout development will be paramount. However, it is still an early release. Until a stable 1.0 release is available, minor versions (0.<minor>.*) may contain breaking changes.

This is a spare time project. Please take it easy if there are delays in replying.