erlyberly icon indicating copy to clipboard operation
erlyberly copied to clipboard

Pretty print dicts

Open aboroska opened this issue 9 years ago • 2 comments

Pretty printing dicts would be nice. Something like: if element(1, X) =:= dict then dict:to_list(X)

aboroska avatar Dec 30 '14 15:12 aboroska

I like it, this could be done in the term viewer showing a breakdown of the function argumentss and results.

andytill avatar Dec 30 '14 21:12 andytill

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.

andytill avatar Oct 31 '15 17:10 andytill