Skip to content

Latest commit

 

History

History
58 lines (47 loc) · 1.43 KB

README.md

File metadata and controls

58 lines (47 loc) · 1.43 KB

hexa.nvim

Lua

Simple hexadecimal editor for neovim.

demo

Installation using lazy.nvim

  return {
    "qleveque/hexa.nvim",
    opts={}
  }

Default configuration

{
  keymaps = {
    hex = {
      reformat = '<leader>f',
    },
    ascii = {
      replace = 'r',
      undo = 'u',
      redo = '<C-R>',
    },
    run = '<CR>',
  },
  run_cmd = function(file) return 'bot sp | term "'..file..'"' end,
  ascii_left = false,
}

Available commands

  • :HexSearch: performs a forward search ignoring spaces and newlines
  • :HexSearchBack: same as HexSearch, but backward
  • :HexReformat: properly reformats the hexa content
  • :HexBin: switches between binary and hexa representation
  • :HexRun: runs the binary file
  • :HexGoto: goes to the given hexa position
  • :Hex: open current file as a binary file
  • :UnHex: open original file

Usage

  • / triggers the HexSearch command
  • ? triggers the HexSearchBack command
  • Enter triggers the HexRun command
  • r replace a single character in the ASCII representation

Dependencies

This plugin requires python3 and xxd.

Credits

This plugin was inspired by Raafat Turki's hex.nvim excellent plugin.