Skip to content

Release v1.0.0

Choose a tag to compare

@michal-ruzicka michal-ruzicka released this 19 Jul 13:57
· 180 commits to main since this release
v1.0.0
1840a95

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
    (HexPairActive for the cursor side, HexPairMirror for 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 :w in 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, :HexPairGoAscii and
    :HexPairSwap jump between the two representations of the byte
    under the cursor.
  • Binary correctness. A file opened without vim -b is reloaded
    with :edit ++bin on the first toggle, so the dump always shows the
    exact on-disk bytes and a later :w cannot 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 column

Full documentation: :help hexpair after installation.

Requirements

  • Vim 8.0+ (native packages; the plugin uses lambda expressions).
  • The xxd utility, which ships with Vim — looked up on PATH first
    and then in $VIMRUNTIME, so on Windows the bundled xxd.exe is
    found even when it is not on PATH.

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.tar

About 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.