3 ms·
The docs in the Elixir REPL are such a pleasure to use. Tab completing a function will show a list of possible matches, and then you can type `h function_name`
by agentwiggles 4y ago
The docs in the Elixir REPL are such a pleasure to use. Tab completing a function will show a list of possible matches, and then you can type `h function_name` to see the doc for that function.
It's incredibly useful, partially because the standard library is well organized. For example, maybe you need some string manipulation function, but you're not sure what it's called. You'd type `h String.` and then hit tab. Now all the functions of that module are listed. Ah, String.graphemes looks promising - so you finish your line `h String.Graphemes` and skim the doc. Now, to make sure you understand, you might type `String.graphemes("foo")` and then see the result is what you want.
I almost never have to Google for an answer when writing Elixir (at least for simple stuff) because the REPL is so robust as a doc lookup tool.
My only wish is that the vscode extension had some features around sending buffer code to the REPL like SLIME or other Lispy editor plugins. You can reload code, but it's a little more manual than I'd like.