BVI

Edit Commands


If you would like to use the insert and delete commands, you have to enable them with the :set memmove (or :set mm) 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.

CommandBVIVI
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
Aappend bytes at end of file
Ddelete bytes to end of file
Aappend characters at end of line
Ddelete characters to end of line
Insert
bytes
i insert byte in front of cursor position
a insert byte after cursor position
Iinsert byte at begin of file
Iinsert characters at begin of line
 not available
oinsert new line below current line
Oinsert new line above current line
Delete
bytes
x delete byte at cursor position
Xdelete byte in front of cursor position
dSPACEdelete 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'adelete from current position to mark a
dnGdelete from current position to byte with (decimal) address n
 not available, because there are no lines, sentences, paragraphs or sections in a binary file
dddelete 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
 not available
Ddelete from current position to EOF
d$
Ddelete from current position to end of line
d$
Undo
edits
u Undo the most recent change
 not available
UUndo 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!

Back to the top
Page updated: September 9th 2013 by Gerhard Bürgmann, Purkersdorf/Austria
Have a look at "Lighting Lifts"