Fast Vim-inspired hex editor for the terminal
Fast Vim-inspired hex editor for the terminal
Follow the instructions here to install cargo. Then, open up a terminal and type
cargo install dz6yay -S dz6pacman -S dz6pkg install dz6If you have WinGet, install dz6 with
winget install mentebinaria.dz6Scoop users can also
scoop install dz6Alternatively, download the release package for your system.
Homebrew users can
brew install dz6If you want to test the most recent, but still under development, version of dz6, you'll need Cargo and git, then you can
git clone https://github.com/mentebinaria/dz6.git
cd dz6
cargo install --path .Usage: dz6 [OPTIONS]
Arguments:
File to open
Options:
-o, --offset Initial cursor offset (hex default; `t` suffix = decimal) [default: 0]
-r, --readonly Set read-only mode
-h, --help Print help
-V, --version Print versionOnce you load a file in dz6, you can use the commands below.
| Key | Action | Tips |
|---|---|---|
Tab |
Switch views | Cycle through Hex, Text, and Headers. Backtab: Cycle backward. |
Alt+l |
Open log window | |
: |
Open command bar | See Commands |
| Command | Action | Parameters | Tips/Examples |
|---|---|---|---|
| `` | Go to offset | hex default; t suffix = decimal; + prefix = incremental jump; - prefix = decremental jump |
|
cmt |
Add to |
|
cmt 1000 "my comment" (comment at offset 0x1000; offset obeys the same rules above) |
sel |
Select bytes from |
|
sel 40 10t (select 10 bytes from offset 0x40) |
set byteline |
Set the number of bytes per line | `` or auto |
set byteline 8 (default is 16; auto enables automatic setting based on screen width) |
set ctrlchar |
Set the character shown in the ASCII dump for non-graphic values | `` | set ctrlchar " " would set a blankspace (default: .) |
set db |
Turn on database file saving/loading (default) | A database file with a .dz6 extension will be used to store bookmarks and comments for the file |
|
set nodb |
Turn off database file saving/loading | ||
set dimzero |
Dim (gray out) null bytes only (default) | ||
set dimctrl |
Dim all control characters | All non-graphic characters will be dimmed | |
set nodim |
Turn off byte dimming | ||
set theme |
Set the theme | dark or light |
set theme light (default: dark) |
set view |
Changes the current view | text, hex or header |
set view header (default: hex) |
set wrapscan |
Enable search results wrap | ||
set nowrapscan |
Disable search results wrap | ||
w |
Write changes to file | ||
wq or x |
Write changes to file and quit | ||
q |
Quit without saving changes | In replace mode, T (truncate) is an exception because it modifies the file immediately. |
If you need permanent settings, create a
$HOME/.dz6initfile containing any of the commands above, one per line. dz6 will load that at startup. Lines starting with#are ignored.
This is the main view you would expect from a hex editor. It displays file offsets alongside the file contents in a hexadecimal dump that you can navigate, search, edit, and more.
| Key | Action | Tips |
|---|---|---|
| Arrow keys | Navigation | Vim-like h, j, k, l also work |
w d q |
Advance by a word (2 bytes), a dword (4 bytes), or a qword (8 bytes), respectively | Use the capital letters W, D, and Q to move backwards |
o |
Go to the next other byte (the one that differs from the byte under the cursor) | O goes backwards |
Home or 0 |
Set the cursor to the beginning of the current line | |
End or $ |
Set the cursor to the end of the current line | |
Ctrl+Home or g |
Go to the first offset | |
Ctrl+End or G |
Go to the last offset in the file | |
Ctrl+f or Page Down |
Move down one page | |
Ctrl+bor Page Up |
Move up one page | |
r |
Enter replace mode | |
z |
Set the byte under the cursor zero | |
~ |
Change case if applicable | Only works with bytes within the ASCII alphabetic range |
Ctrl+a |
Increment byte under the cursor | |
Ctrl+x |
Decrement byte under the cursor | |
v |
Enter select mode | |
u |
Undo the last change made to the buffer | Use it before writing to the file (:w) |
/ |
Search (forward) | Search the entire file. Tab cycles between ASCII and hex search |
n |
Search next (forward) | |
? |
Search (backward) | Search the entire file. Tab cycles between ASCII and hex search |
N |
Search next (backward) | |
s |
Open Strings window | |
Backspace |
Go to the previously visited offset | This is useful after a Go to command, for example |
+ |
Add current offset to bookmarks | |
- |
Go to the last added bookmark | |
Alt+1..8 |
Go to bookmark | |
Alt+- |
Remove the last added bookmark | The cursor must be at the bookmarked offset |
Alt+0 |
Clear bookmarks | |
Alt+h |
Toggle b |
No open issues yet, or sync has not completed.