Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pretty print dicts #9

Open
aboroska opened this issue Dec 30, 2014 · 2 comments
Open

Pretty print dicts #9

aboroska opened this issue Dec 30, 2014 · 2 comments

Comments

@aboroska
Copy link
Contributor

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

@andytill
Copy link
Owner

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

@andytill andytill changed the title [enhancement] Pretty print dicts Pretty print dicts Dec 30, 2014
andytill pushed a commit that referenced this issue Oct 31, 2015
…a dicts internal representation as something readble.
@andytill
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants