Next: Constructing Maps, Previous: Multiple Maps, Up: Maps and Map-files [Contents][Index]
Certain maps make sense when editing certain types of data. For example, dwarf.map is intended to be used in ELF files. In order to ease using maps, poke provides a feature called auto mapping, which is disabled by default.
You can set auto mapping like this:
(poke) .set auto-map yes
When auto mapping is enabled, poke will look to the value of the
pre-defined variable auto_map
, which must contain an array of
pairs of strings, associating a regular expression with a map name.
For example, you may want to initialize auto_map
like this in
your .pokerc file:
auto_map = [[".*\\.mp3$", "mp3"], [".*\\.o$", "elf"], ["a\\.out$", "elf"]];
This will make poke to load =mp3.map= for every file whose name ends with .mp3, and elf.map for files having names like foo.o and a.out.
Following the usual pokeish philosophy of being as less as intrusive
by default as possible, the default value of auto_map
is the
empty string.