0xfefe0102 rom.dis /^fefe0102/ 0xfefe0104 rom.dis /^fefe0104/ 0xfefe0106 rom.dis /^fefe0106/You just need the tag string, the file it is in, and a search command for that file.
:let mapleader = "-" " special hooks for sun3/80 disassembly " hook for redoing disassembly nnoremapThese just define the mappings "-d" and "-s". These are just the tip of the iceberg. These do what is called a vim filter on the current line. They send to current line to some external program, which reads it on stdin. Then whatever output that program generates replaces the line that was sent out.d :.!./redisv nnoremap s :.!./vim_string
Doing what I do, the assembler gets out of sync sometimes. Not very often, but when it does, usually a 2 byte chunk of zeros after a "rts" instruction causes the trouble. Apparently a compiler was padding generated output for some reason. Perhaps to keep subroutine addresses on 4 byte boundaries.
So I need to redo the assembly starting at the right place. Usually the right place is 2 bytes after where the trashed disassembly is.
I set up a keybinding so that when I type "-d" vim sends the current line to an outboard program (written in python). That python code gets the line, pulls the address out of it, adds 2 to it, and then calls objdump to disassemble at that address. Then it returns the result to vim, which replaces the line. I include the original line and some markers and I do have to do some hand editing, but I don't have to exit vim, write addresses on scratch paper, and run objdump with crazy options.
The filter takes one or more lines on stdin and spits out replacements on stdout. It can do anything you want. It can even ignore the input.
Here I use ":.!" to trigger the filter, but "!!" is different but equally useful, especially if you don't want to add something to your .vimrc.
Type "help filter" in Vim and read what it has to say.
Or search on "vim filter".