Posts Tagged ‘vi’

Hex editor – vi?

Open the file as your normally would ( For example, vi mybinary.fil):
To view in hex:
Enter the following from command mode: :%!xxd

To switch back:
Enter the following from command mode: :%!xxd -r

If you are making changes you want to save, make sure you switch back before saving the file. Otherwise, you end up saving the file as the text you see when viewing the file in hex mode.

How to find a tab character in vi.

To display all the special characters or escape sequences:

: set list

To find the tab character (^I). Hold down control and hit vi.:

/^vi

Return top

INFORMATION