Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
HXAVI(1)			 User Commands			      HXAVI(1)

NAME
       hxavi - A binary	editor for vi and Vim users

SYNOPSIS
       hxavi  [-a]  [-b]  [+[address]]	filename

DESCRIPTION
   1.ABOUT
       Hexvi  is a binary editor which shows binary files as dumplist of hexa-
       decimal numbers,	and user can edit binary  files.   As  commands	 about
       cursor  movements  are almost similar to	vi(1) or vim(1), it is easy to
       remember.
       It must be hard to use if you don't have	any experience of vi or	vim.

   2.OVERVIEW
       2.1.System of the editor
	   It displays the contents of file using hexadecimal numbers and cor-
	   responding characters.  Users can scroll this  dumplist,  and  move
	   cursor freely on it,	change,	delete and insert the contents.

       2.2.Available environments
	   It  works  on  the  terminals  which	 have more than	or equal to 80
	   columns, but	only for the envrironments of UTF-8.

       2.3.Similarities	and differences	with vi
	   The command specifications are as similar as	 possible  to  vi  and
	   vim.	 In  particular, the cursor movement, which has	a large	impact
	   on the user experience, is the same as vi commands, so  you	should
	   be able to operate it almost	immediately.

	   But	the  units  which  are important when using vi,	like sentence,
	   word, secton	have no	meaning	for binary editor because  the	object
	   treating  in	binary editor is usually not text files.  There	are no
	   commands to process these units.
	   There are some operations for the line on the screen	on  the	 other
	   hand.

   3.TERMINOLOGY
       Next notations are used in the explanetions about commands from here.

       - Space key ................................. <spc>
       - Tab key ................................... <tab>
       - Shift+Tab key ............................. <shift+tab>
       - Enter key ................................. <ent>
       - Escape	key ................................ <esc>
       - Backspace key ............................. <bs>
       - Insert	key ................................ <ins>
       - Delete	key ................................ <del>
       - Home key .................................. <home>
       - End key ................................... <end>
       - PageUp	key ................................ <pgup>
       - PageDown key .............................. <pgdn>
       - Arrow keys ................................ <left>,<right>,
						     <up>,<down>
       - Press A with Control key .................. ^A
       - Omissible parts ........................... [ ]
       - Separator of similar commands ............. |
       - Separator of opposit commands ............. /

   4.START AND QUIT
       4.1.How to start
	   hxavi				... (1)
	   hxavi filename			... (2)
	   hxavi +[address] filename		... (3)
	   hxavi -a [+[address]] filename	... (4)
	   hxavi -b [+[address]] filename	... (5)

	   In  the  startup  method (1), the explanation of the	startup	method
	   (usage) and the version of the program are displayed, and the  pro-
	   gram	ends.

	   In  (2),  the dump list from	the beginning of the specified file is
	   displayed on	the initial screen, and	the command input  wait	 state
	   is displayed. This is the normal startup method.
	   You cannot specify multiple files.

	   In  (3),  the cursor	will be	moved to the position specified	by ad-
	   dress when the specified file is first opened. If you omit  address
	   and	specify	 only  "+", the	cursor will be moved to	the end	of the
	   file.  Address can be a hexadecimal or decimal number. For  details
	   on how to write it, see Section 7.1.

	   The "-a" option (4) enables alternate screen	if your	terminal soft-
	   ware	supports it. As	a result, when the hxavi command finishes, the
	   terminal  display  returns  to  the	state  it was in before	it was
	   started.

	   The "-b" option (5) is used when opening a large file that  exceeds
	   the	memory	size.  Because	mmap(2)	 is used to read and write the
	   file, it can	be used	without	slowing	down  the  operation,  but  it
	   also	imposes	restrictions on	editing. For details, see Section 7.8.

       4.2.How to end
	   You	can  use  ZZ|ZQ|:q<ent>|:q!<ent>|:wq [newname]<ent>|:wq! [new-
	   name]<ent>.
	   The details will be described later,	but it works in	the  same  way
	   as vim.

   5.DESIGN OF SCREEN
       When you	start it, the following	screen will be displayed.  The top two
       lines  are an area that displays	information about the entire file, the
       lines below that	are an area for	dumping	the file contents, a line beow
       that is a command input line, and a line	below that is message  display
       line.   Depeiding  on  the option settings, a decimal interpretation of
       the currently displayed data may	be displayed below that.
 ------------------------------------------------------------------------------
 ReadOnly NotSaved Modified [-b] [-rwxr-xr-x] [sym->   3] [2025-11-12 18:01:38]
 000001B3CF2/0000036255F, 50%,.......1785074/.......3548511	&#141;,U+00008D
 <COMMAND>  | +0 +1 +2 +3 +4 +5	+6 +7 +8 +9 +A +B +C +D	+E +F |0123456789ABCDEF
 000001B3CE0| C7 E8 8A 48 FE FF	48 8B 05 33 C7 1B 00 48	8B 40 |...H..H..3...H.@
 000001B3CF0| 38 48 8D 70 FF FF	FF 48 3B 01 75 0E 48 8B	BD 70 |8H.p...H;.u.H..p
 000001B3D00| FF FF FF 89 DE E8	45 51 FE FF E8 70 18 FE	FF 85 |......EQ...p....
 000001B3D10| C0 74 4C 48 8B 05	05 C7 1B 00 48 8B 70 38	8B 58 |.tLH......H.p8.X
 000001B3D20| 40 48 8B 3D 97 C1	1B 00 BA 01 00 00 00 E8	DD 91 |@H.=............
 000001B3D30| FD FF 48 8B 0D 86	C1 1B 00 8B 49 24 8D 51	FE 83 |..H.......I$.Q..
				  :(omit)
 000001B3E80| 08 48 8B 3D 97 C5	1B 00 48 83 C7 38 E8 CE	50 FE |.H.=....H..8..P.
 000001B3E90| FF 83 F8 FF 0F 84	7F FD FF FF 8D 43 FF 85	DB 89 |...........C....
 000001B3EA0| C3 0F 8F 58 FF FF	FF E9 6D FD FF FF 48 8B	05 6C |...X....m...H..l
 000001B3EB0| C5 1B 00 4C 8B B5	38 FF FF FF 41 0F 10 06	0F 11 |...L..8...A.....
 (Command input	line)
 (Message display line)
  U08  [ 141]	 U32	     [ 4294930573]			<Little	Endian>
  S08  [-115]	 S32	     [	   -36723]    F32[nan		]
  U16[ 28813]	 U64[	88744882012647565]    D64[+9.946970177023031e-303]
  S16[ 28813]	 S64[	88744882012647565]    L80[+2.0933824499565909030e-3820]
  BIT[0	000111001110101]

	    [0.000000100111011010010001111111111111111111111110111000010001101]

 ------------------------------------------------------------------------------

       5.1.File	information display area
	   The first line shows	the file status, whether the  "-b"  option  is
	   used,  the file permissions,	number of file links, and modification
	   time.  Depending on the status of the file, the  status  of	"Read-
	   Only",  "NotSaved", "Modified" will be displayed.  If the file is a
	   symbolic link or if the hard	link is	2 or more, it may affect other
	   files, so the number	of links is highlighted	to alert you.
	   The next line always	shows the address / file length	of the current
	   cursor position in hexadecimal and decimal.	If  the	 data  at  the
	   cursor position can be interpreted in Unicode, the code number will
	   be displayed.
	   At  the  beginning  of  the next line, it shows whether the current
	   edit	mode is	<COMMAND> / <REPLACE> /	<INSERT>.

       5.2.File	content	display	area
	   It consists of a one-line address gauge and	a  dump	 list  display
	   area	 below	it.   The left 11 digits indicate the address, and the
	   data	is displayed in	hexadecimal in the center accordingly.	In ad-
	   dition, there is a display field by character when the data is  re-
	   garded as a character code at the right end.	 In the	character dis-
	   play	field, you can change the character code to be recognized with
	   the ': set encoding ='option	described later.

       5.3.Command input line,Message display line
	   The	command	 input	line  is  one line below the dump list display
	   area.  Here,	it is used to input  commands  with  parameters.   One
	   line	below that is the message display line.	 Used to display warn-
	   ings	and messages from the editor.

       5.4.Display in decimal
	   Display  the	 data  content	at the cursor position in decimal.  It
	   shows the decimal value when	interpreted as a 1 to 8	byte signed or
	   unsigned integer, and a 4 to	10 byte	floating point number.

       5.5.Help	screen
	   The ':help' command described later temporarily changes the	entire
	   screen to the command help screen.
	   Scroll with 'j'/'k',	and type 'q'|'<esc>' to	return to the original
	   screen.

       5.6.Manual Screen
	   The	':man'	command,  which	will be	described later, allows	you to
	   view	the same information as	in the manual that can be viewed  with
	   man(1).   You can scroll using 'j'/'k' etc.,	and type 'q' to	return
	   to the original screen.  Requires the less(1) command to work.

       5.7.Colormap Screen
	   You can view	the 256-color color map	using the ':cmap' command  de-
	   scribed  below.  You	can scroll using 'j'/'k' etc., and type	'q' to
	   return to the original screen.  Requires  the  less(1)  command  to
	   work.

   6.COMMANDS
       This  section  describes	 the commands that can be used with hxavi.  Of
       the following commands, those with a '*'	at the beginning  of  the  de-
       scription  have	different names	and functions from the commands	vi(1),
       vim(1).

       6.1.Command for screen scrolling, moving	cursor
	   A group of commands that control the	data display range and	cursor
	   position, and does not affect the data contents of the buffer.

	   (command)(explanation)

	   h|H|<bs>|<left>
		     Move the cursor one byte to the left.
	   l|<spc>|<right>
		     Move the cursor one byte to the right.
	   k|^P|<up> Move the cursor one line up to the	same column.
	   j|^N|<down>
		     Move the cursor down one line to the same column.
	   0|^
		     Move  the	cursor to the position of the data at the left
		     end of the	line.
	   $
		     Move the cursor to	the position of	the data at the	 right
		     end of the	line.
	   fHH	("HH" is a 2-digit hexadecimal number)
		     Search  forward for HH in the line	and move to that loca-
		     tion if found.
	   FHH	("HH" is a 2-digit hexadecimal number)
		     Search backward for HH in the line	and move to that loca-
		     tion if found.
	   tHH	("HH" is a 2-digit hexadecimal number)
		     Search forward for	HH in the line,	and if found, move  to
		     just before that location.
	   THH	("HH" is a 2-digit hexadecimal number)
		     Search backward for HH in the line, and if	found, move to
		     just after	that location.
	   ;	     Repeated search within the	line.
	   +|<ent>   Move the cursor to	the beginning of the next line.
	   -	     Move the cursor to	the beginning of the previous line.
	   H|<home>  Move the cursor to	the home position (upper left corner).
	   M	     Move the cursor to	the left edge of the center line.
	   L
		     Move  the	cursor	to the left edge of the	bottom line of
		     the screen.
	   <end>
		     Move the cursor to	the right edge of the bottom  line  of
		     the screen.
	   zt	     Moves the line where the cursor is	to the top edge.
	   zz	     Moves the line where the cursor is	to the center.
	   zb	     Moves the line where the cursor is	to the bottom edge.
	   z<ent>
		     Moves  the	 line where the	cursor is to the top edge, and
		     the cursor	moves to the left edge.
	   z.
		     Moves the line where the cursor is	to the center, and the
		     cursor moves to the left edge.
	   z-
		     Moves the line where the cursor is	to  the	 bottom	 edge,
		     and the cursor moves to the left edge.
	   ^Y/^E
		     Scroll  one  line up (towards the smaller address)	/ down
		     (towards the larger address).
	   ^U/^D
		     Scroll up (towards	the smaller address)  /	 down  (toward
		     the larger	address) by half a page.
	   ^B|<pgup> Display the previous page.
	   ^F|<pgdn> Display the next page.
	   gg	     Move the cursor to	the top	left edge of file.
	   G	     Move the cursor to	the bottom left	edge of	the file.
	   :go <destination address><ent>    or
	   :<destination address><ent>
		     Move  the	cursor	to  the	address	indicated by <destina-
		     tion>(Hexadecimal|Decimal|Octal|Binary). Please refer  to
		     7.1 for how to write address.
	   /{pattern}<ent>
		     Searches  the data	specified in pattern (7.5. Later) for-
		     ward (in the direction of the large address).   The  pat-
		     tern  can be either an even number	of hexadecimal digits,
		     or	a string of text begining with a '"'  (double  quote).
		     Do	not enclose the	pattern	with another '/'.
	   /<ent>
		     Repeat  the  forward search with the previously specified
		     pattern.
	   ?{pattern}<ent>
		     Searches the data specified by pattern backward  (in  the
		     direction of the small address).
	   ?<ent>
		     Repeat  the backward search with the previously specified
		     pattern.
	   /:{decimalnumber}<ent>
		     Specify a decimal number to search	forward	for data  with
		     that    value.   Data   type   can	  be   selected	  with
		     <tab>,<shift+tab>.
	   /:{decimalmin},{decimalmax}<ent>
		     Given two decimal numbers,	search forward	for  data  be-
		     tween the two values. When	searching by specifying	float-
		     ing  point	numbers, it is better to specify a range using
		     two values, as there is a conversion error	between	binary
		     and decimal numbers, and it is difficult  to  match  them
		     with one value.
	   ?:{decimalnumber}<ent>
		     Specify a decimal number to search	backward for data with
		     that    value.   Data   type   can	  be   selected	  with
		     <tab>,<shift+tab>.
	   ?:{decimalmin},{decimalmax}<ent>
		     Given two decimal numbers,	search backward	for  data  be-
		     tween the two values. When	searching by specifying	float-
		     ing  point	numbers, it is better to specify a range using
		     two values, as there is a conversion error	between	binary
		     and decimal numbers, and it is difficult  to  match  them
		     with one value.
	   n	     Repeated the last search (in the same direction).
	   N	     Repeat the	last search (reverse direction).
	   mx	     (x	is one of a-z) Give the	cursor position	the name x.
	   'x	     Jumps to the location of name x and move to the far left.
	   `x	     Jump to the location of name x.

	   The following is a summary of the movements of the main commands.

						    ^
				^Y	 ^ ^U	    | ^B|<pgup>
	      +---------------^----------|----------|--------------+
	      |	H|<home><--					   |
	      |				 k|^P			   |
	      |	-	<--		  ^			   |
	      |	0|^	<--   <bs>|^H|h	<-X-> l|<spc>	       ->$ |
	      |	+|<ent>	<--		  v			   |
	      |				 j|^N			   |
	      |	M	<--					   |
	      |							   |
	      |			 -->:g address<ent>		   |
	      |							   |
	      |							   |
	      |							   |
	      |	L	<--				 --> <end> |
	      +---------------v----------|----------|--------------+
				^E	 v ^D	    | ^F|<pgdn>
						    v

       6.2.Command to change the contents of the buffer
	   This	is a rewrite operation for the data buffer.

	   (commands)(explanation)
	   i|<ins>
		 Enter	insert mode. The mode display changes to <INSERT>. The
		 commands available in it are:

		 (commands)(explanation)
		 !
			 *  Display  the  help	screen	in  the	 mode.	 Press
			   the'<esc>'  or  'q'keys  to	return to the original
			   screen.
		 0-9|a-f|A-F
			   Enter the hexadecimal value.

		 "{string}<ent>
			 * Insert the character	string entered in "string"  as
			   data.

		 :{decimalnumber}<ent>
			 *  Interprets	the decimal number entered with	"deci-
			   malnumber" and inserts it as	data.
			   You can select which	 data  type  (integer/floating
			   point  number,  with/without	 sign, data length) to
			   interpret the entered decimal number	with <tab>  or
			   <shift+tab>.	  <tab>	 and  <shift+tab>  can be used
			   even	while entering a numerical value.  (The	 first
			   character is	a colon':'.)

		 #{binarynumber}<ent>
			 *  Interprets	the  binary number entered with	"bina-
			   rynumber" and inserts it as data.
			   You can select which	 data  type  (integer/floating
			   point  number,  with/without	 sign, data length) to
			   interpret the entered binary	number with  <tab>  or
			   <shift+tab>.	 :set decimalview must be set.

		 h|^H|<bs> Cancellation, retreat.
		 ^L	 * Redisplay the screen.
		 <esc>	   Exit	the mode.

	   I	 Move to the beginning of the line and enter insert mode.
	   a	 Move one byte ahead of	the cursor to enter insert mode.
	   A	 Move to the end of the	line and enter insert mode.
	   o	 Move to the beginning of the next line	and enter insert mode.
	   O	 Move to the beginning of the line and enter insert mode.

	   R
		 Enter	overwrite mode.	The mode display changes to <REPLACE>.
		 The commands available	in it are:

		 (commands)(explanation)
		 !
			 *  Display  the  help	screen	in  the	 mode.	 Press
			   the'<esc>'  or  'q'keys  to	return to the original
			   screen.
		 0-9|a-f|A-F
			   Enter the hexadecimal value.
		 "{string}<ent>
			 * Insert the character	string entered in "string"  as
			   data.

		 :{decimalnumber}<ent>
			 *  Interprets	the decimal number entered with	"deci-
			   malnumber" and inserts it as	data.
			   You can select which	 data  type  (integer/floating
			   point  number,  with/without	 sign, data length) to
			   interpret the entered decimal number	with <tab>  or
			   <shift+tab>.	  <tab>	 and  <shift+tab>  can be used
			   even	while entering a numerical value.  (The	 first
			   character is	a colon':'.)

		 #{binarynumber}<ent>
			 *  Interprets	the  binary number entered with	"bina-
			   rynumber" and inserts it as data.
			   You can select which	 data  type  (integer/floating
			   point  number,  with/without	 sign, data length) to
			   interpret the entered binary	number with  <tab>  or
			   <shift+tab>.	 :set decimalview must be set.

		 h|^H|<bs> Cancellation, retreat.
		 ^L	 * Redisplay the screen.
		 <esc>	   Exit	the mode.

	   x|<del>   Deletes 1 byte at the cursor position.

	   X	     Deletes the 1 byte	before the cursor position.

	   rHH	     Set 1 byte	of data	at the cursor position to HH.

	   y{motion}
		     Copy  the	data from the current position to the location
		     you move with motion.

	   yy|Y	     Copy the current line of data.

	   d{motion}
		     Deletes the data from the current position	to  the	 loca-
		     tion moved	by motion.

	   dd	     Delete the	current	line of	data.

	   D
		     Delete  the  data	from the cursor	position to the	end of
		     the line.

	   p
		     Insert the	copied or deleted data just after  the	cursor
		     position.

	   P
		     Insert  the copied	or deleted data	just before the	cursor
		     position.

	   .	     Repeat the	last editing command.

	   :i {start address},{end address},{destination address}<ent>
		   * Copy the data from	{start address}	to {end	 address}  and
		     insert  it	 into  {destination address}. {Destination ad-
		     dress} must be outside {start address} to {end  address}.
		     The  range	includes {start	address} but not includes {end
		     address}. Refer to	7.1 and	7.3. Below for	how  to	 enter
		     the address.

	   :d {start address},{end address}<ent>
		   *  Delete  the  data	 from the start	address	to the end ad-
		     dress. The	specified range	includes {start	 address}  but
		     not  includes  {end address}. For the input method	of the
		     address, refer to 7.1 and 7.3.

	   u
		     For commands that change the contents of the buffer, undo
		     the changes. There	is no limit to the number of times.

	   ^R
		     For commands that change the contents of the buffer, redo
		     the retroactive changes with undo.	There is no  limit  to
		     the number	of times.

       6.3.Commands for	saving file and	/ or quitting

	   (commands)(explanation)

	   ZZ
		     Exit  the	editor.	Export only if the file	has been modi-
		     fied.
	   ZQ	     Exit the editor without exporting.

	   :w [{altname}]<ent>
		     Export to a file. The editor will	continue  editing.  If
		     altname  is  specified,  export to	altname	instead	of the
		     original file.

	   :w! [{altname}]<ent>
		     Force export to a file. The editor	will continue editing.

	   :q<ent>
		     Cancel edit + Exit	editor.	If there is a  change  in  the
		     file, it will only	give a warning to that effect and will
		     not exit.

	   :q!<ent>
		     Cancel edit + Exit	editor.	Exit without checking for file
		     changes. Same as ZQ.

	   :wq [{altname}]<ent>
		     Export to file + end. If export fails, it will not	end.

	   :wq!	[{altname}]<ent>
		     Export to file + Finish.

       6.4.Other commands

	   (commands)(explanation)

	   ^L	     Redraw the	screen.

	   ^G	     Displays the name of the file being edited.

	   ={formula}<ent>
		   *  Calculates a formula and displays	the result.  Addition,
		     subtraction, multiplication, division and remainder  cal-
		     culation  of  integers  (hexadecimal, decimal, octal, bi-
		     nary) can be performed.  Parentheses can  also  be	 used.
		     See 7.3 for how to	write integers.

	   :!{command}<ent>
		     Start  a  shell  and execute command. Enter the <ent> key
		     etc. to return to the original screen.

	   :bytemap<ent>
		   * Switch the	screen to display  the	data  in  a  graphical
		     bytemap view. The commands	available in it	are:

		     (commads)(explanation)

		     ^F/^B|^D/^U|^E/^Y|j/k|^N/^P|<pgdn>|<pgup>|<down>|<up>
			       Scroll the display.
		     +/-
			       Increases  / decreases the number of bytes dis-
			       played on one line.
		     (/)
			       Rotate the data column displayed	in one row  to
			       the left	/ right.
		     <tab>/<shift+tab>
			       Switch between the following modes.
			       -Mode to	display	0x00 as	a blue dots
			       -Mode to	display	0x01-0x1f with a light blue dots
			       -Mode to	display	0x20-0x7f with a red dots
			       -Mode to	display	0x80-0xff with black dots
		     ^L
			       Redisplay the screen.
		     q|<esc>
			       Exits  the bytemap view and returns to the dump
			       screen.
		     g
			       Exits the bytemap view and returns to the  dump
			       screen,	jumping	to the address in the top left
			       of the view.

	   :bitmap<ent>
		   * Switch the	screen to display  the	data  in  a  graphical
		     bitmap view. The commands available in it are:

		     (commads)(explanation)

		     ^F/^B|^D/^U|^E/^Y|j/k|^N/^P|<pgdn>|<pgup>
			       Scroll the display.
		     +/-
			       Increases  / decreases the number of bytes dis-
			       played on one line.
		     (/)
			       Rotate the data column displayed	in one row  to
			       the left	/ right.
		     </>
			       If  the	number	of bytes displayed on one line
			       exceeds the width of the	screen,	the screen  is
			       shifted left or right.
		     zt/zz/zb
			       Moves  the  line	 with  the cursor to the top /
			       center /	bottom line
		     z<ent>/z./z-
			       Moves the line where the	cursor is to the top /
			       center /	bottom line, and the cursor  moves  to
			       the left	end.
		     j/k|h/l|H/M/L|0/$|^H|<bs>|<left>|<right>|<down>|<up>
			       Move the	cursor.
		     U	       Flip the	image upside down.
		     W	       Inverts the black and white of the image.
		     s/r       Set / reset 1-bit data at the cursor location.
		     u	       Undo 1-bit set, reset.
		     ^R	       Redo 1-bit set, reset.
		     ^L	       Redraw the screen.
		     q|<esc>
			       Exit  the  bitmap  view and jump	to the address
			       where the cursor	is currently displaying.
	   :cmap<ent>
		   * Displays a	sample of the 256 colors that can be  used  in
		     the editor. The color number of each color	shown here can
		     be	 used  with the	':set color' commoand or in the	~/.hx-
		     avirc file. The 256 ANSI standard colors that are thought
		     to	be available on	most terminals these days  are	sorted
		     in	 the  HSV color	space rather than the usual RGB, so it
		     should be easy to find the	color you're looking for.
		     Less(1) is	used for display, so you can search  for  num-
		     bers. Exit	the display with 'q' or	':q'.

	   :file [{newname}]<ent>
		     Rename  the  file to newname. This	name will be used when
		     saving the	file from now on. If newname is	not specified,
		     the current file name will	be displayed (same as ^	G).

	   :help<ent>
		   * Switch the	 screen	 to  display  the  list	 of  commands.
		     Scroll  by	 typing'j','k',	 and  return  to  the original
		     screen by typing the'q'key.

	   :histogram<ent>
		   * Switch the	screen and display the	distribution  of  data
		     values  (0x00 to 0xff) in a graphical histogram. The com-
		     mands that	can be used in it are as follows.
		     (commands)(explanation)

		     h/l       Moves the histogram left/right.
		     j/k       Enlarges/reduces	the vertical axis.
		     q|<esc>   Ends the	histogram display.

	   :logo<ent>
		   * Displays the logo and version of this program.

	   :man<ent>
		   * Displays the online manual	for this program.
		     It	uses less(1) for display, so you can search for	txt.
		     Exit with q or :q.

	   :set<ent>  or
	   :set	all<ent>
		     Shows a list of current values for	options	 that  can  be
		     specified with ":set".

	   :set	ambiwidth[=(single|double)]<ent>
		     Among UTF-8 characters, characters	whose width is ambigu-
		     ous are displayed in half-width/full-width. Double	is ap-
		     propriate	when  using  in	 Japanese. If the parameter is
		     omitted, the current setting value	Is displayed.

	   :set	biblen[=N]<ent>
		   * Specifies the cursor Blinking Interval in milliseconds on
		     the Bitmap	displayed by the: bi[tmap] command.

	   :set	bidlen[=N]<ent>
		   * Specifies the cursor Blinking Interval in milliseconds on
		     the Dump screen.

	   :set	bytes[=N]<ent>
		   * Change the	number of bytes	displayed on one line  of  the
		     dump  list	 to  N	bytes.	The minimum value is 4.	If you
		     omit the parameter, the number of bytes  in  the  current
		     dump list is displayed.

	   :set	cmdenter[=commands]<ent>
		   *  Sepcify  the  command you	want to	execute	when you enter
		     the command line.	it is intended to control IME.

	   :set	cmdleave[=commands]<ent>
		   * Specify the command to be executed	when exiting the  com-
		     mand line.	 It is intended	to control IME.

	   :set	color<ent>
		   *  This  shows  the current settings	for the	editor's color
		     usage. Colors are used  in	 bitmap,  bytemap,  histogram,
		     logo,  marks  on  dumplist, and search highlights.	If the
		     terminal has  color  capabilities,	 it  shows  the	 color
		     swatches for each color directly.

	   :set	color {place} {part}=N<ent>
		   * Updates the editor	color setting to N. The	following list
		     shows where {place} and {part} can	be used.

		     bitmap scale     :Bitmap scale color
		     bitmap data      :Bitmap data color
		     bytemap scale    :Bytemap scale color
		     bytemap zero     :Bytemap data color at 0x00
		     bytemap ctrl     :Bytemap color at	0x01-0x1F,0x7F
		     bytemap ascii    :Bytemap color at	0x20-0x7E
		     bytemap high     :Bytemap color at	0x80-0xFF
		     histogram scale  :Histogram scale color
		     histogram data   :Histogram data color
		     logo letter      :Logo text color
		     logo cat	      :Logo cat	color
		     dump mark	      :Mark color added	with the mx comand
		     search hl	      :Search highlihgt	color

		     N specifies the color number of one of the	256 ANSI stan-
		     dard  colors.  Each  {place} {part} can be	abbreviated as
		     long as it	remains	distinct. For example,

		      ":set color bytemap scale=23"

		     can be effectively	enterd as

		      ":s co by	s=23"

		     However, since you	cannnot	use  the  :cmap	 color	sample
		     while entering the	settings, this interface can be	diffi-
		     cult  to  use.  Therefore,	it is better to	enter the set-
		     tings in ~/.hxavirc with a	text editor while viewing  the
		     colors in :cmap.

	   :set	[no]decimalview<ent>
		   *  The numerical value obtained by interpreting the data at
		     the cursor	position in multiple  data  formats  and  data
		     length is displayed in decimal.
		     Display types are 8-bit unsigned integer(U08), signed in-
		     teger(S08),  16-bit  unsigned  integer(U16), signed inte-
		     ger(S16),	32-bit	unsigned  integer(U32),	 signed	 inte-
		     ger(S32),	64-bit	unsigned  integer(U64),	 signed	 inte-
		     ger(S64),	32-bit	floating  point	 number(F32),	64-bit
		     floating  point  number(D64),  80-bit floating point num-
		     ber(L80).
		     The result	of bit representation of any of	the above data
		     is	also displayed.	Which data to display can be  selected
		     by	pressing the <tab> key or <shift+tab> key.

	   :set	encoding[={name}]<ent>
		     Specifies the encoding that interprets the	data when dis-
		     playing characters. If the	parameter is omitted, the cur-
		     rent settings and a list of selectable encodings are dis-
		     played.
		     The  supported encoding names and their abbreviations are
		     as	follows:

		     utf-8	       (u)
		     euc-jis-2004      (e)
		     shift_jis-2004    (s)
		     iso-2022-jp-2004  (j)
		     iso-8859-1	       (i)
		     utf-16le	       (ul)
		     utf-16be	       (ub)

	   :set	endian[=(little|big)]<ent>
		   * Specifies the endianness when interpreting	the data  with
		     decimalview.

	   :set	[no]flash<ent>
		   *  Specifies	whether	to flip	the screen momentarily to warn
		     (visible bell) when an impossible action is performed.

	   :set	helplang[=(ja_JP|en_US|...)]<ent>
		     Select the	display	language for help and messages.	If you
		     omit the parameter, the current settings and  a  list  of
		     selectable	languages are displayed.

	   :set	[no]hideescseq<ent>
		     When  displaying  characters  in  iso-2022-jp-2004, it is
		     easier to read the	dump list if the escape	sequence  part
		     is	 not  displayed	as characters. By setting this option,
		     the data in the escape sequence part will be displayed as
		     blank.

	   :set	hxaviend[=commands]<ent>
		   * Specify the command to be executed	when hxavi  is	termi-
		     nated.  It	is intended to control IME.

	   :set	lines[=N]<ent>
		     Change  the display area of the dump list to N lines. The
		     minimum value is 3. If you	omit the parameter,  the  cur-
		     rent number of rows in the	dump list is displayed.

	   :set	ttimeoutlen[=N]<ent>
		     When  a  special key input	is performed and an escape se-
		     quence occurs, the	time to	wait  for  its	completion  is
		     specified in milliseconds.

	   :set	[no]usecolor<ent>
		   *  Specifies	 whether  to use color for highlighting	search
		     results and displaying bitmaps and	histograms.

	   :set	[no]wrapscan<ent>
		     When searching for	a pattern, specify whether to continue
		     the search	beyond the end or beginning of the file.

   7.MISCELLANEOUS
       7.1.About the count of each command
	   For many commands, if you enter a number  just  before  entering  a
	   command,  the  command  repeats that	number of times. You can count
	   decimal, hexadecimal, octal,	or binary.

	   -  Enter the	exact digit string (0-9) as the	decimal	number.
	      Example: 180, 32767
	   -* Hexadecimal numbers are "16#" followed by	a string of digits
	      (0-9,a-f,A-F), and finally "#".
	      Example: 16#ABC#,	16#123f#
	   -* For octal	numbers, enter a digit string (0 to 7) after "8#".
	      Example: 8#1777, 8#0123
	   -* For binary numbers, enter	a digit	string (0 to 1)	after "2#".
	      Example: 2#10101011

	   When	entering the count, the	recognized value is displayed  at  the
	   bottom of the screen.

	   Count in command mode:
	       Count-enabled commands:
		   h ^H	<bs> <left> l <spc> <right> k ^P <up> j	^N <down> + -
		   <ent> H L fHH FHH tHH THH ; / ? n N ^Y ^E ^U	^D ^B <pgup>
		   ^F <pgdn> i I a A o O r R x <del> X d dd D y	yy Y p P
		   . u ^R
	       Count-disabled command:
		   "x 0	^ $ <home> M <end> gg G	'x `x z<ent> z.	z- zt zz zb
		   mx ^L ^G ZZ ZQ ! <tab> <shift+tab> :	= <esc>
	   Count in :bitmap:
	       Count-enabled commands:
		   ^F <pgdn> ^B	<pgup> ^D ^U ^E	^Y ^N ^P < > ( ) + -
		   h <left> ^H <bs> l <right> j	<down> k <up> H	L u ^R
	       Count-disabled command:
		   ^C zt zz zb z<ent> z. z- 0 $	M s r U	W ^L q <esc>
	   Count in :bytemap:
	       Count-enabled commands:
		   ^F <pgdn> ^B	<pgup> ^D ^U ^E	^Y ^N ^P ( ) + -
		   j <down> k <up>
	       Count-disabled command:
		   ^C <tab> <shift+tab>	^L g q <esc>
	   Count in :histogram:
	       Count-enabled commands:
		   h <left> l <right> j	<down> k <up>
	       Count-disabled command:
		   q <esc>

       7.2.Shortening commands
	   For	commands  beginning with ":", you can enter the	minimum	string
	   of characters necessary to distinguish it from other	commands.  For
	   example,

	   For	":set ambiwidth=double<ent>",  ":s am=d<ent>" is sufficient.

	   For	":set nowrapscan<ent>",	       ":s now<ent>"  is sufficient.

       7.3.About entering formulas
	   Mathematical	expressions can	be written as parameters of :i,	:d, :g
	   and	=  commands.  Addition,	subtraction, multiplication, division,
	   remainder calculation, and parentheses can be used in  mathematical
	   expressions.	  You  can use hexadecimal, decimal, octal, and	binary
	   numbers in formulas.	 The input method for each number is the  same
	   as  for "count" in 7.1.  Also, the address where the	cursor is cur-
	   rently located can be expressed with	'.' (dot).

	   Example:  =(16#7f+8)*27%16<ent>

	   Example:  :i	.,.+16#100,.+16#200<ent>

	   Example:  :g	16#ab00+128<ent>

       7.4.About the register
	   The copy, delete, and paste commands	(y yy d	dd p P)	allow  you  to
	   specify a register before the command.
	   Registers  include  26 named	registers from ["a] to ["z] and	anony-
	   mous	registers that are used	if no name is specified.

	   - If	you do not specify a register, the copied or deleted data will
	     be	in the anonymous register. When	you paste the data, you	do not
	     need to specify the register.

	     Example: 10yy{motion}p :
		Copy 10	lines of data to the destination moved by {motion}.

	   - If	you specify a register,	the copied or  deleted	data  will  be
	     stored  in	 the named register as well as the anonymous register.
	     After that, the data in the named register	will be	saved even  if
	     you edit file by inserting	or deleting.

	     Example: "a10yy(various edits){motion}"ap :
		Copy 10	lines of data to the destination moved by {motion}.

       7.5.How to specify pattern in search command
	   The data that can be	specified with the search command is:

	   -  a	hexadecimal string, a literal string, or a mixture of both.
	   -  decimal number (1	or 2) specified	after detaermining the data
	      length.

	   Hexadecimal	strings	represent 1 byte as a double-digit number, and
	   literal strings are specified by  enclosing	both  ends  in	double
	   quotes (").

	   Both	can be arranged	alternately within one line.

	   / <"literal"> <hexadecimal> <"literal"> <hexadecimal> ...
	   ? <Hexadecimal> <"literal"> <hexadecimal> <"literal"> ...

	   It doesn't support regular expressions, so there's no metacharacter
	   other than double quotes. You can search for	a fixed	string of data
	   as  you type	it.  For hexadecimal columns, you must enter even dig-
	   its correctly and specify integer bytes.

	   Ignore whitespace in	the input data that is not enclosed in	double
	   quotes.   If	 you  want  to search the double quote itself, you can
	   search by specifying	the hexadecimal	number 22 because 22 in	 hexa-
	   decimal represents (") in ASCII code.

	   example: /"Hello World"<ent>
		      Search forward for the character string [Hello World].

	   example: /22"Hello World"22<ent>
		      Search forward for the character string ["Hello World"].

	   example: ?1b	28 42<ent>
		      Search backwards for the beginning of an ASCII string
		      in an iso-2022-jp* text document.

	   example: /:3.141592,3.141593<ent>
		      If the data type is F32(float 32bit),D64 or L80:
		      Search forward for data greater than or equal to 3.141592
		      and less than or equal to	3.141593.

       7.6.Color-related environment variables
	   In many environments, many people use a terminal with ther TERM en-
	   vironent  variable  set  to "xterm",but this	xterm is configured to
	   use only 8 colors. If you can still see the 256 colors in the color
	   table with :cmap, you should	be able	to use any color you like with
	   hxavi by changing the TERM environment variable  to	"xterm-256col-
	   ors".

       7.7.How to use cmdenter,cmdleave,hxaviend
	   If  you  use	IME to enter multibyte characters on the command line,
	   it would be more convenient to use the editor if you	could automat-
	   ically turn off IME when returning from the command line.  You  can
	   achive this by using	cmdenter,cmdleave, and hxaviend.

	   - Example configuration when	using fcitx:

	       :set cmdleave=fcitx-remote -c >/dev/null	2>&1

	   - Example configuration when	using fcitx5:

	       :set cmdleave=fcitx5-remote -c >/dev/null 2>&1

	   - Example configuration when	using ibus-mozc:

	       (for Japanese keyboard)
	       :set cmdenter=ibus engine mozc-jp      >/dev/null 2>&1
	       :set cmdleave=ibus engine xkb:jp::jpn  >/dev/null 2>&1
	       :set hxaviend=ibus engine mozc-jp      >/dev/null 2>&1

	       (for English keyboard)
	       :set cmdenter=ibus engine mozc-jp      >/dev/null 2>&1
	       :set cmdleave=ibus engine xkb:us::eng  >/dev/null 2>&1
	       :set hxaviend=ibus engine mozc-jp      >/dev/null 2>&1

	   This	 setting  can be written in .hxavirc.  The leading ':' (colon)
	   is not required in .hxavi.

	   The timing of cmdenter operation is as follows:

	   - Immediately after typing "	to enter a string in i or R command
	   - Immediately after typing /	? /" or	?" to enter a string in
	     / or ? command

	   The timing of cmdleave operation is as follows:

	   - In	all cases, exit	the command line
	   - Immediately after typing :	in a general command
	   - Immediately after typing :	to enter a decimal number in the i
	     or	R command
	   - Immediately after typing #	to enter a bynary number in the	i
	     or	R command
	   - Immediately after typing /: ?:  to	enter a	decimal	number with
	     the / or ?	command
	   - Immediately after typing =	to enter a formula

       7.8.Handling large files	with the -b option
	   Normally, hxavi loads the entire  file  into	 memory	 and  performs
	   editing  operations	in  memory. However, if	you are	working	with a
	   huge	file that exceeds the available	memory size, this method  will
	   make	operation extremely slow and unusable.

	   Therefore,  the  -b option uses a system function called mmap(2) to
	   view	and change only	the small portion of the data being  displayed
	   or edited, thereby avoiding slow operation.

	   This	 method	allows for fast	data reference and overwrite modifica-
	   tions, but when you try to change the length	of a file  by  insert-
	   ing,	 deleting,  or appending, it requires accessing	or rewriting a
	   wide	range of data in the file, making it extremely slow and	there-
	   fore	impractical.

	   For this reason, the	-b option restricts the	commands that  can  be
	   used	as follows:

	   - Unavailable editing commands:
	      i	| I | a	| A | o	| O | x	| X | d	| dd | D | p | P | y | yy | Y |
	      :insert |	:delete

	   - Available editing commands:
	      R	| r | .	| u | ^R

	   - Commands that are available but take a long time:
	      /	| ? | n	| N | :histogram |
	      :wq! altname | :wq altname | :w! altname | :w altname

	   - Other commands that cannnot be used:
	      :file newname

	   Also, because actual	writing	to the file being edited occurs	at un-
	   expected times during editing, you cannot quit editing without syn-
	   chronously saving.

	   - Prohibited	termination methods:
	     When Modified is lit
	      :wq! altname | :wq altname | :q! | :q | ZQ

	   - Allowed termination methods:
	      :wq! | :wq | ZZ

	     (Use undo to return to the	beginning, or use :w.)
	     When Modified is not lit
	      :wq! altname | :wq altname | :q! | :q | ZQ

       7.9.About the personal configuration file (~/.hxavirc)
	   The	":set"	command	 allows	you to set various optional parameters
	   related to the operation of hxavi. By writing these setting	values
	   in  advance	to the file ".hxavirc" in your home directory, you can
	   always enable the values when starting the command.	In this	 file,
	   the	initial	 ":" of	the command is not required.  A	sample of this
	   file	is located in the documentation	directory described below.

ENVIRONMENTS
       Terminal	encoding is UTF-8 only.

       The recommended environment variable for	TERM is	"xterm-256color".

FILES
   (FreeBSD)
       /usr/local/bin/hxavi		  Executable

       /usr/local/share/doc/hxavi/*	  Location  of	Documents.  Sample  of
					  Personal  configuration  file	can be
					  found	here.

       /usr/local/lib/hxavi/hxavi*/*	  Location of various resources

       ~/.hxavirc			  Personal configuration file.

   (Linux)
       /usr/bin/hxavi			  Executable

       /usr/share/doc/hxavi/*		  Location  of	Documents.  Sample  of
					  Personal  configuration  file	can be
					  found	here.

       /usr/share/hxavi/hxavi*/*	  Location of various resources

       ~/.hxavirc			  Personal configuration file.

VERSION
       The version is displayed	when started only with the command name	hxavi.

SEE ALSO
       vi(1), vim(1), less(1), ncurses(3)

BUGS
       * UTF-8 is the only terminal environment	that can be used.
	 This is because characters other than laten1 and  Japanese  are  used
	 for  character	display	of control code, graphic display of bitmap and
	 histogram.  However, the encoding scheme of data  that	 can  be  dis-
	 played	as a character is not limited to this.

       * Files	other than normal files	(directories, device files, etc.) can-
	 not be	read or	written.

       * The logical upper limit of the	file size that can be  handled	is  16
	 terabytes (0x100000000000 bytes = 17,592,186,044,416 bytes).  This is
	 due to	the limit on the number	of digits that can be displayed	on the
	 screen.

       * Unicode  U+2800  to U+28ff (Braille Patterns) are used	for bitmap and
	 bytemap views and histograms. Depending on the	design of these	 char-
	 acters, they may not look beautiful.

       * Because  the  author is not a native English speaker The English text
	 of this manual	may not	be fluent.  If you find	any problems with  the
	 translation  in this manual or	help messages, I hope you fix them and
	 let me	know.

AUTHOR
       "Michihiro Satoh", <satoumc(at_sign)hxavi.net>
       https://hxavi.net/

COPYRIGHT
       It is provided under the	BSD 2-Clause License.
       This program is designed	to be useful but is not	guaranteed.  Copyright
       is  reserved, but it is free to use/modify. For details,	see (directory
       of documents)/COPYRIGHT.

hxavi-1.2.0.20260301		  2026-03-01			      HXAVI(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=hxavi&sektion=1&manpath=FreeBSD+Ports+15.1.quarterly>

home | help