Lets you select and run code blocks that are indented (e.g. inside a function). No configuration needed.
def foo():x = 1print('x is', x)# Select the above two lines and run them with Hydrogen!
Does not work if the first line ends in
: and you have a comment after, i.e.
if True: # having a comment here breaks thingsprint("This doesn't work!")
It also can have unexpected results if you select some code that is malformed to begin with, e.g.
x = 1print("x is", x) # This works even though it shouldn't
(Pull requests are welcome to fix the first issue; the second probably can't be fixed without changing the Hydrogen package)
Activate using the "Hydrogen Python: Toggle Variable Explorer" command.
This feature is currently in proof-of-concept status. Please file an issue about any functionality you want to have in the variable exploror!
Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.