C hxavi : vi or Vim style binary (hex) editor on FreeBSD

I've wanted a vi/Vim-like binary editor that I could use on FreeBSD.
With existing tools, hexdump -C only lets you view files,
and vim -b isn't particularly well-suited for heavy editing.
Using :%!xxd in vim allows you to edit in hexadecimal, but it doesn't allow you to insert or delete data.
bvi is a solid tool, but it's a shame that you can only undo once.
So I developed a binary editor on FreeBSD that includes the features I wanted.
I call it "hxavi."
- Since the operation is nearly identical to vi/Vim, the learning curve is low for vi/Vim users.
- There's no limit on the number of undo/redo operations.
- You can even edit huge files by overwriting them.
I don't think you'll use a binary editor very often, but
I'd appreciate it if anyone interested would try it out and give me feedback.
Source files (.tar.gz) and packages (.pkg) are available at
https://hxavi.net/en/
Registration with the official ports/packages is currently being requested.
 
AI,
To set up
coc.nvim (Conquer of Completion) as your intellisense engine using vim-plug, follow these steps. This setup provides modern IDE features like autocompletion and linting to your Vim or Neovim editor.


1. Requirements

Before installing, ensure you have the following binaries installed on your system:

  • Node.js (version 14.14 or higher).
  • npm or yarn to manage dependencies.

2. Installation with vim-plug

Add the following line to your .vimrc (Vim) or init.vim (Neovim) within the plug#begin and plug#end block:

plug#begin()
Use release branch (recommended)
Plug 'neoclide/coc.nvim' , 'branch':'release'}
plug#end()<br></span>
Use code with caution.

After adding the line, restart Vim and run the command:
PlugInstall.


3. Basic Configuration

To make coc.nvim behave like a modern editor, you should add standard mappings to your configuration file (e.g., using Tab for completion):


vim

Blablabla


4. Installing Language Servers

coc.nvim itself is just the engine. You must install extensions for specific languages:

  • Python: :CocInstall coc-pyright
  • C/C++: :CocInstall coc-clangd
  • JSON: :CocInstall coc-json
  • Rust: :CocInstall coc-rust-analyzer

5. Hex/Binary Editing (Optional)

If you specifically need to edit binary files in a hex-style view (often confused with the "binary" requirements of plugins), you can use a dedicated hex-editor plugin alongside CoC:

  • hexmode: Automatically toggles hex mode for binary files.
  • pfp-vim: A hex-editor plugin that uses templates to parse binary structures.
 
AI,
To set up
coc.nvim (Conquer of Completion) as your intellisense engine using vim-plug, follow these steps. This setup provides modern IDE features like autocompletion and linting to your Vim or Neovim editor.


1. Requirements

Before installing, ensure you have the following binaries installed on your system:

  • Node.js (version 14.14 or higher).
  • npm or yarn to manage dependencies.

2. Installation with vim-plug

Add the following line to your .vimrc (Vim) or init.vim (Neovim) within the plug#begin and plug#end block:

plug#begin()
Use release branch (recommended)
Plug 'neoclide/coc.nvim' , 'branch':'release'}
plug#end()<br></span>
Use code with caution.

After adding the line, restart Vim and run the command:
PlugInstall.


3. Basic Configuration

To make coc.nvim behave like a modern editor, you should add standard mappings to your configuration file (e.g., using Tab for completion):


vim

Blablabla


4. Installing Language Servers

coc.nvim itself is just the engine. You must install extensions for specific languages:

  • Python: :CocInstall coc-pyright
  • C/C++: :CocInstall coc-clangd
  • JSON: :CocInstall coc-json
  • Rust: :CocInstall coc-rust-analyzer

5. Hex/Binary Editing (Optional)

If you specifically need to edit binary files in a hex-style view (often confused with the "binary" requirements of plugins), you can use a dedicated hex-editor plugin alongside CoC:

  • hexmode: Automatically toggles hex mode for binary files.
  • pfp-vim: A hex-editor plugin that uses templates to parse binary structures.
I was completely unaware of the Vim features you mentioned. I'd like to try them out.
...
Thank you for the suggestion. After doing a little research, coc.nvim seems a great tool for IDE features.
But my focus with hxavi is to solve specific issues in binary editing that existing Vim plugins can't handle.
Such as inserting/deleting bytes without breaking the format and efficiently handling huge files.
hexmode still relies on xxd, which has the limitations I mentioned in my original post. hxavi is a standalone tool designed to overcome these.

The other tool you recommended, pfp-vim, sounds interesting.
My hxavi doesn't have structural analysis capabilities yet, but I'd like to add such features someday.
 
Back
Top