If you would like to use the insert and delete commands, you have to
enable them with the :set memmove option. These commands are
locked per default, because you must not move bytes to a different
address for many types of binary files (e.g. executables, database files,
etc.). If you usually edit files where bytes can be moved, you can add
the :set memmove directive to your .bvirc file.
Command | BVI | VI |
Replace bytes |
r |
replace a single byte, no ESC needed |
R |
replace multiple bytes until you type ESC |
~ |
toggle between uppercase and lowercase of a byte |
|
Append bytes |
A | append bytes at end of file |
D | delete bytes to end of file |
|
A | append characters at end of line |
D | delete characters to end of line |
|
Insert bytes |
i |
insert byte in front of cursor position |
a |
insert byte after cursor position |
|
I | insert byte at begin of file |
|
I | insert characters at begin of line |
|
|
o | insert new line below current line |
O | insert new line above current line |
|
Delete bytes |
x |
delete byte at of cursor position |
X | delete byte in front of cursor position |
dSPACE | delete byte at cursor position |
dfC |
delete from current position to next character C |
d/xyz |
delete from current position to first occurance of matching pattern
xyz
|
d?xyz |
delete from current position to first occurance of matching pattern
xyz in reverse direction
|
d'a | delete from current position to mark a |
dnG | delete from current position to byte with (decimal) address n |
|
not available, because there are no lines, sentences,
paragraphs or sections in a binary file |
|
dd | delete line |
d) | delete from cursor position through first
following end of sentence |
d} | delete from cursor position through first
following end of paragraph |
d] | delete from cursor position through first
following end of section |
|
d\6a 56 ff |
delete from cursor position to first occurance of hex pattern
6a 56 ff |
d#6a 56 ff |
delete from cursor position to first occurance of hex pattern
6a 56 ff in reverse direction |
|
|
D | delete from current position to EOF |
d$ |
|
D | delete from current position to end of line |
d$ |
|
Undo edits |
u |
Undo the most recent change |
|
|
U | Undo all of the changes made to the current line |
|
Note that most of the commands can be used with a decimal repeat count in front
of the command!