erlyberly
erlyberly copied to clipboard
Pretty print dicts
Pretty printing dicts would be nice. Something like:
if element(1, X) =:= dict then dict:to_list(X)
I like it, this could be done in the term viewer showing a breakdown of the function argumentss and results.
I have pushed some first steps towards this, it could be improved but is still useful.
If you right click the 'dict' atom in the term tree and then select the "Dict to List" option in the menu, a sub window is shown with the dictionary as a props list. Stuff still to do:
- Better highlighting of key/values, like in the process state term tree.
- Don't show the square brackets for the surrounding list.
- Highlight the dict atom in the term tree, if it's parent is a tuple to show that this has special behaviour.
- Disable the menu item if the selected value is not a dict.