# Hextazy — Usage Documentation Hextazy is a colorful terminal **hexadecimal editor**, inspired by [hexyl](https://github.com/sharkdp/hexyl). ![Illustration with all possible bytes](./assets/hextazy.png) ## Install - Prebuilt amd64 linux binary: - With Rust installed: `cargo install hextazy` - Archlinux (AUR): `paru -S hextazy` - Nix: `nix-env -i hextazy` ## Usage `hextazy` takes the file to edit as an argument: ``` Usage: hextazy [file] ``` Example: ```bash hextazy ./test/all_bytes.bin ``` You edit the file directly. Use `Tab` to switch between the Hexadecimal and Ascii editors. When you're done, press **`q`** or **`Ctrl + C`** to **exit**. ## Shortcuts ### Core shortcuts | Key Combination | Action | |-----------------|--------| | `Ctrl + Q` | **Exit** the app. | | `Ctrl + C` | Exit the app without saving. | | `q` | Exit the app (in _hex editor_ mode). | | `Tab` | Switch between _ascii_ and _hexadecimal_ editor mode. | | `Ctrl + J` | Switch between **Insert** and **Overwrite** mode. | | `Ctrl + Z` | **Undo** the last write. | | `Ctrl + S` | **Save** your changes. | | `Del` | **Delete** the following byte in **Insert mode**. | | `v` | Open **Inspector**. | | `:` | Open the command bar. | | `Esc` | Close the command bar. | | `/` | Open the search bar. | ### Handy shortcuts | Key Combination | Action | |-----------------|--------| | `Ctrl + →` | Jump 4 bytes to the right. | | `Ctrl + ←` | Jump 4 bytes to the left. | | `Ctrl + Y` | **Redo**, cancel the last _undo_. | | `Ctrl + U` | **Undo all** changes. | | `Backspace` | **Move left** / **Undo** the modification of the **previous byte**. | ### Search | Key Combination | Action | |-----------------|--------| | `/4142` | Search the hex value `0x4142`, and the ascii string `"4142"`. | | `n` | Go to the next search result. | | `Shift + n` | Go to the previous search result. | | `:s/abc` | Search the _string_ `"abc"`. | | `:x/4142` | Search the hex value `0x4142`. | | `:xi/4142` | Search the hex value in reverse order: `0x4241`. | ### Commands The command bar is opened with `:` in the _hexadecimal editor_ mode. | Command | Action | |--------------------|--------| | `:` | Open the command bar. | | `:q` | Close the app. | | `:x` | Save and close the app. | | `:0x1234` | Jump to the address `0x1234`. | | `:+10` | Move the cursor forward by 10 bytes. | | `:-10` | Move the cursor back by 10 bytes. | | `:+0x10` | Move the cursor forward by 16 bytes (hex offset). | | `:-0x10` | Move the cursor back by 16 bytes (hex offset). | | `:i` or `:insert` | Switch to _insert_ mode. | | `:o` or `:overwrite` | Switch to _overwrite_ mode. | | `:hexyl` | Switch to the _hexyl_ style. | | `:!hexyl` | Switch to the _default_ style. | ## Input/Output - **Input:** any binary or text file passed as the single CLI argument. - **Output:** edits are applied in place; save with `Ctrl + S` (or `:x`) to write changes back to the file. Exit with `Ctrl + C` to quit without saving.