Extra tool: show code in vim or image
Proposition to have an "extra package" to choose between generating images and communicating to a remote vim session for showing code.
We could have two classes with the same API, initialized differently depending command-line arguments for instance.
E.g.: show_code(tracker)
Show code would then be able to have access to the next_lineno
and last_lineno
and either generate a .jpg file, or send sequence of instructions to a vim remote session.
It is still unclear to me whether the tracker
also has the path to the source file. The tool stack_heap_visualizator
uses instead the args.prog_name
variable. It would be more elegant to retrieve this information in the tracker.
Maybe the tracker
should be passed only once during the initialization of the "show code" object.