PitchHut
Log in / Sign up
hx
7 views
Hex Editing Made Simple, No Frills Attached.
Pitch

Introducing a straightforward hex editor designed for terminal enthusiasts. Built with plain C and without any external dependencies, it streamlines the editing process using ANSI escape sequences. With a Vim-like interface and essential commands at your fingertips, it’s an efficient tool for developers and power users who appreciate simplicity and efficiency in their workflows.

Description

Introducing hx: A powerful hex editor designed for the terminal, built using pure C and POSIX libraries. Inspired by the simplicity and efficiency of the kilo project, hx provides a lightweight and effective tool for editing binary files in a straightforward manner.

Features:

  • Minimal Dependencies: hx requires no external libraries, including curses, thanks to its usage of ANSI escape sequences for terminal output.

  • Intuitive Commands: Easily open files and navigate through data with simple commands:

    hx filename       # Open a file
    hx -h             # Display help
    hx -v             # Show version information
    hx -o 32 filename # Show file with 32 octets per line
    hx -g 8 filename  # Group octets to 8
    
  • Vim-like Navigation: Utilize familiar keybindings for effective navigation and editing:

    • CTRL+Q: Quit without saving
    • CTRL+S: Save changes
    • hjkl: Navigate using Vim-like movement keys
    • / and n: Search for byte values

Command Mode:

When in normal mode, enter command mode by pressing ESC followed by : to execute special commands:

  • :w: Write changes to the file
  • :q: Quit editor (with warning if the buffer is dirty)
  • :set o=16: Set octets per line

Implementation Details:

Hx uses raw ANSI escape sequences for terminal manipulation. It switches the terminal into raw mode to read keypresses, process them, and render outputs efficiently. Detailed documentation can be found within the heavily commented source code—"Use The Source Luke!"

Future Enhancements:

The development roadmap includes potential features such as a configuration file for customizing colors and default settings.

Embrace the power of hx for your binary editing tasks and experience a terminal-centric approach to hex editing!