A longer term feature desired for Tank are custom commands per tank and custom macros per page. The mechanism for each of these is unclear.
For commands the idea is that a configuration tiddler would list per tank bits of javascript to be added on each wiki page. These would manipulate the dom or otherwise add or change existing behavior. It would be handy if each command lived in its own tank with a particular structure, a sort of package.
Macros would work something like the macro @FND has described for BFW.
-- Just a thought from @Jermolene: given the hoped for overlap in Tank users and TW users, we should be aware that TiddlyWiki5 uses the terms "macro" and "widget" for its own purposes. "Macros" in TW5 are very similar to classic C/C++ macros: they are just text expansions. "Widgets" in TW5 are bundles of JS magic packaged as a reusable component. It's fine to overload the terms if they're the best words for you to use, but it is going to add to the cognitive load for some users.
Yeah, it's a good point. I think for now the terms are basically just placeholders. Macros, at least is fairly generic so perhaps safe. Widgets less so. Given that above I kept using the term "command" where I had meant to use widget, I reckon that says something. -- @cdent