For some types of editing, particularly “binary” files, it is easiest to display and edit the file in hexadecimal. Octal editing is also available.

How to Switch to Hexadecimal Editing

You can switch to hexadecimal or octal editing in three ways:

  • Select View > Toggle hex mode split or Alt-\ (recommended)
  • Select View > Toggle display mode or Alt-D several times until the window is in hexadecimal or octal.
  • Set Config > Characters/Cursors > Screen display mode to "8" ("16" for Octal)

VIEW > Toggle hex mode split lets you edit a file in two windows; one displays in hexadecimal, the other in normal ASCII. (You can also display in EBCDIC.) The ASCII window initially uses display mode “4” in which all characters, including the “newline” <LF>, <CR> and <Tab> characters are displayed literally (using the IBM PC character set). The cursors in both windows are synchronized and will move together.

When editing in hexadecimal, you may find it easier to treat the file as a binary file with a uniform 16 or 64 characters displayed per screen line. You can easily enter Binary-16 mode by selecting VIEW > Toggle hex mode split again. VIEW > Toggle binary/text mode ( Alt-= ) toggles between Binary-16, Binary-64 and the normal file types.

By default, selecting a binary file type will only let you overstrike characters and not insert or delete characters. If you need to insert/delete, change CONFIG > File handling > Overwrite mode to “0”.

Use WINDOW > Next window ( Ctrl-F6 ), WINDOW > Switch ( Alt-F5 ) or the mouse to switch between the windows. If desired, use VIEW > Toggle display mode ( Alt-D or toolbar) to toggle either window to a different display mode. For example, you can toggle the ASCII window to EBCDIC so that you can edit in hex and EBCDIC at the same time.

Helpful Hex Mode Editing Options

How to edit a file in split-screen Hex and ASCII with 16 characters per line

  1. Select VIEW > Toggle hex mode split ( Alt-\ ).
  2. Select it again to toggle to Binary-16 mode.

In a hex-mode window, new characters must be entered in hexadecimal, i.e. by entering “00” through “FF”. Other characters cause an error beep. Similarly, in octal-mode, new characters must be entered in octal, i.e. by entering “000” through “377”.

When the current window is displayed in hexadecimal, the status line changes to display the cursor’s hexadecimal offset into the file.

To Print a File in Hex

  1. Press Alt-D to display the file in hex.
  2. Select the menu item CONFIG > File handling and change File type to the desired number of characters (in the file) to be printed per line. Typical values would be 16 or 32.
  3. Select the menu item FILE > Print. The file will be printed as you see it on the screen.

For More Information on vEdit's Hex Editing Using Help

  1. Select "Data/Binary; Hex editing" from the HELP > Tutorial menu.
  2. Press F1 for on-line help and select the topic "Control and Graphics Character Display"; then page down to the heading "Hexadecimal and Octal Mode Editing".
  3. The on-line help topic "File Types - DOS/Windows, Unix, Mac, Data/Binary" also contains related information.

Hex Mode Editing

Related Resources