📎 Webclip
Speed up your daily work with Elixir console tricks
The article lists IEx tricks meant to make daily Elixir work smoother. It points to built-in help, autocomplete, shell history, multiline input, previous results, faster recompilation, and a local .iex.exs file for imports, aliases, variables, and IEx configuration.
Reading notes#
- Use
hin IEx to check documentation for built-in modules instead of switching to a browser. iex -S mixgives access to project modules and their docs, including@docand@moduledoc.- Tab completion helps with module and function names, and it only shows public functions.
- Shell history can be enabled with
iex --erl "-kernel shell_history enabled"or by settingERL_AFLAGS. - IEx supports multiline pasting and can reuse the previous result with
v()when a pasted expression starts with a binary operator. - Previous results can be reused for debugging or for computations that are expensive to run again.
recompilelets you test code changes without restarting the console.- A local
.iex.exscan import modules, add aliases, set variables, and configure IEx on startup.
