What do you people do for reading Erlang docs?
Is there something like Ruby’s ri?
I installed manual pages for Erlang under /usr/local/share/man and it works, but entering man erlang shows all the Built-In Functions as one long page and when I press tab after typing man erlang, it asks me if I want to list 22003 items. I don’t think it’s super useful. How do I filter things I need among these many items?
Compare it for example with git’s manual pages. When I press tab after typing man git, it asks me if I want to list 172 items, and when I say yes (press tab again), it shows all the useful things.
How do I use Erlang’s manual pages usefully like that?
I usually just Google for language docs (tho I did read the Rails Guides on my Kindle) so I’m curious how others might be consuming docs! I think there are plugins for Vim (and probably other editors) to display docs, but I just prefer using the web as sometimes markup or diagrams are there too.
For the official docs I prefer something in the terminal. It’s often faster than finding something on the web, especially when you’re on a slow or unreliable connection. For Ruby I used ri, for Elixir, the h inside iex.
For Go I used godoc tool, but back then I didn’t know it can be used directly like godoc fmt. I actually used it to run the doc server on the localhost (godoc -http :4444).
I learned much of Git using manual pages (unix man tool), because Git’s manual pages are straight-forward, i.e., for every command there is a manual page and you can list all the commands by typing man git and pressing tab twice. For Erlang I think I’ll need some more of the man tool’s knowledge.
I almost forgot to talk about TL;DR, which is a nice terminal based tool, it’s FOSS so you can participate easily.
It’s, you named it, a shorter version of man.
Nice to quickly find something.
Today I learned that man pages for Erlang are installed by default with the installation of Erlang. You don’t need to install man pages manually, but you need to access it through the erl command with -man flag instead of the man command, for example erl -man lists.
I wish to know how to list all the modules using erl -man command.
I have man tool.
I still need to somehow set up the access paths to the documentation, but I haven’t been able to do something yet. I have not yet figured out what settings need to be made.
If you have man tool, you can download Erlang’s man pages from www.erlang.org/downloads, decompress it and copy folders (man1…man7) to the place where other man pages are located. In that case you’ll have to access Erlang man pages directly with man command instead of erl -man command.
On Mac man pages can be found in /usr/local/share/man and/or /usr/share/man.