Giter Site home page Giter Site logo

hexl-note's Introduction

hexl-note.el - Hexl Mode Annotations

Hexl Note allows annotating sequences of bytes in hexl-mode buffers.

00000000: 0000 007d 0000 007e ffff febf fffe 1dc0  ...}...~........
00000010: 7050 b120 83cb e93e 0000 80ff 0000 c07f  pP. ...>........
00000020: 2068 6578 6c20 f09f 92ac 206e 6f74 6520   hexl .... note 

With the default configuration, running:

  • M-2 C-c C-i i 4 RET b
  • M-2 C-c C-i i 4 RET l
  • C-c C-i f 8 RET l
  • M-2 C-c C-i f 4 RET l
  • M-16 C-c C-a (decode-coding-string bytes 'utf-8) RET

Gives:

00000000: 0000 007d 0000 007e bffe ffff c01d feff  ...}...~........
          <-------> <-------> <-------> <------->
          BE:125    BE:126    LE:-321   LE:-123456
00000010: 7050 b120 83cb e93e 0000 80ff 0000 c07f  pP. ...>........
          <-----------------> <-------> <------->
          LE:1.23e-05         LE:-inf   LE:nan
00000020: 2068 6578 6c20 f09f 92ac 206e 6f74 6520   hexl .... note 
          <------------------------------------->
           hexl ๐Ÿ’ฌ note 

Installation

With use-package and straight.el:

(use-package hexl-note
  :straight
  (hexl-note :type git :host github :repo "nick4f42/hexl-note"))

Otherwise, clone this repo and add it to the load-path.

Usage

Enter hexl-note-mode from a hexl-mode buffer.

Create annotations with:

  • hexl-note-annotate (C-c C-a)
  • hexl-note-annotate-number (C-c C-i)

Select annotations with:

  • hexl-note-previous-annot (C-c C-p)
  • hexl-note-next-annot (C-c C-n)

Delete annotations with:

  • hexl-note-delete-selected (C-c C-d)
  • hexl-note-delete-all

Example Configuration

(use-package hexl-note
  :hook (hexl-mode . hexl-note-mode)
  :config

  ;; Add more padding around annotation text.
  (setq hexl-note-padding 2)

  ;; Use unicode arrows.
  (setq hexl-note-arrow-string '(hexl-note-arrow ?โ”” ?โ”€ ?โ”˜ ?โ•ต))

  ;; When using `hexl-note-annotate-number', the default requires specifying
  ;; the type (i, u, or f) and the size:
  (setq hexl-note-number-types
	'((?i "signed integer" int nil)
	  (?u "unsigned integer" uint nil)
	  (?f "floating point" float nil)))
  ;; Instead, give each character a specific size.
  (setq hexl-note-number-types
	'((?c "char" int 1)
	  (?C "unsigned char" uint 1)
	  (?s "short" int 2)
	  (?S "unsigned short" uint 2)
	  (?i "int" int 4)
	  (?I "unsigned int" uint 4)
	  (?f "float" float 4)
	  (?d "double" float 8))))

hexl-note's People

Contributors

nick4f42 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.