Release v1.0.0
hexpair Vim plugin turns the classic :%!xxd workflow into a small, reliable
hex editor for Vim — pure VimScript plus the xxd utility that ships
with Vim, behaving identically on Linux, native Windows (Vim/gVim)
and WSL.
Highlights
- Live pair highlighting. The byte under the cursor is highlighted
in both columns of the dump: stand on a hex pair and the matching
ASCII character lights up, and vice versa. Direction-aware groups
(HexPairActivefor the cursor side,HexPairMirrorfor the
counterpart) show at a glance which column you are in. - Byte-exact cursor mapping. Toggling between the normal view and
the hex view keeps the cursor on the very same byte — exact even for
files with a BOM, CRLF or mixed CRLF/LF line endings, and
single-byte file encodings (utf-16 remains approximate). - Safe
:win hex mode. The buffer is transparently converted
back to binary before the write and the dump is regenerated
afterwards — the file on disk always receives the real bytes, never
the textual dump, and the cursor stays on its byte even when
insertions shifted all offsets. - Forgiving editing. Only the HEX column matters: the offset and
ASCII columns are purely decorative and are stripped before the
reverse conversion. Insert, delete or reorder lines freely —
inserted lines need no offset and no ASCII part; offsets and the
ASCII column self-heal on the next:w. - Column navigation.
:HexPairGoHex,:HexPairGoAsciiand
:HexPairSwapjump between the two representations of the byte
under the cursor. - Binary correctness. A file opened without
vim -bis reloaded
with:edit ++binon the first toggle, so the dump always shows the
exact on-disk bytes and a later:wcannot silently re-encode the
file. - No default key mappings. Commands and
<Plug>mappings only —
you choose your own keys.
Installation
mkdir -p ~/.vim/pack/plugins/start
tar xf hexpair.v1.0.0.tar -C ~/.vim/pack/plugins/start/
vim -c 'helptags ALL' -c 'q'Then add your own mappings to ~/.vimrc, for example:
nmap §h <Plug>(HexPairToggle) " toggle hex view
nmap §< <Plug>(HexPairGoHex) " jump to the HEX column (same byte)
nmap §> <Plug>(HexPairGoAscii) " jump to the ASCII column (same byte)
nmap §- <Plug>(HexPairSwap) " jump to the opposite columnFull documentation: :help hexpair after installation.
Requirements
- Vim 8.0+ (native packages; the plugin uses lambda expressions).
- The
xxdutility, which ships with Vim — looked up onPATHfirst
and then in$VIMRUNTIME, so on Windows the bundledxxd.exeis
found even when it is not onPATH.
Verifying the download
The release tarball is reproducible: packaging the sources of this
tag with ./pack-release (Linux, MacOS, ...) or .\pack-release.cmd (Windows)
produces a byte-identical archive on any platform, so its SHA-256 can be
independently re-derived. The tarball is signed with GPG key
489C 5EC8 0FD6 2BE8 9E59 B4F7 19C1 3E8C E0F5 DB61:
gpg --keyserver keys.openpgp.org --recv-keys 489C5EC80FD62BE89E59B4F719C13E8CE0F5DB61
gpg --verify hexpair.v1.0.0.tar.asc hexpair.v1.0.0.tarAbout this release
v1.0.0 is the first public release, consolidating fourteen internal
iterations that shaped the plugin before this import — the evolution
notes are in CHANGELOG.md.