Home

Awesome

iex package

This package provides Elixir developers with the ability to run an Elixir IEx (REPL) session in an Atom window. It has only been tested on OS X and is unlikely to work properly (or at all) on other platforms.

iex Screenshot

Installation

apm install iex

It is highly recommended that you add the key bindings below. These can be customized as desired. They are not set by default to avoid conflicts with other packages.

Features

Aside from typing directly in the IEx session, the plugin provides actions to improve workflow:

These actions depend on mix, so they only work for mix generated projects and require a mix.exs file at the top level.

Key Bindings

Customizing Key Bindings:

'atom-workspace':
  'cmd-alt-l': 'iex:open'
  'cmd-alt-l down': 'iex:open-split-down'
  'cmd-alt-l up': 'iex:open-split-up'
  'cmd-alt-l left': 'iex:open-split-left'
  'cmd-alt-l right': 'iex:open-split-right'
  'cmd-alt-e': 'iex:reset'
  'cmd-alt-a': 'iex:run-all-tests'
  'cmd-alt-p': 'iex:pretty-print'

'atom-text-editor':
  'cmd-alt-h': 'iex:help'
  'cmd-alt-o': 'iex:gotoDefinition'
  'cmd-alt-x': 'iex:run-tests'
  'cmd-alt-j': 'iex:run-test'
  'cmd-alt-b': 'iex:pipe'

Adding these will provide the following:

Key Bindings and Events

key bindingeventaction
cmd + alt + liex:openOpens new IEx in new tab pane
cmd + alt + l downiex:open-split-upOpens new IEx tab pane in up split
cmd + alt + l rightiex:open-split-rightOpens new IEx tab pane in right split
cmd + alt + l downiex:open-split-downOpens new IEx tab pane in down split
cmd + alt + l leftiex:open-split-leftOpens new IEx tab pane in left split
cmd + alt + eiex:resetStops the application, compiles any changed files with mix, then restarts the application.
cmd + alt + aiex:run-all-testsRun all the test in the project
cmd + alt + xiex:run-testsRun all the tests in the active editor
cmd + alt + jiex:run-testRun the test in which the cursor lies
cmd + alt + hiex:helpPrint the docstring for the function or module under the cursor
cmd + alt + oiex:gotoDefinitionJump to the definition of the function or module under the cursor
cmd + alt + biex:pipePipe the currently selected text to the REPL and execute it
cmd + alt + piex:pretty-printPretty print the last evaluated expression

Fonts

The REPL defaults to using the same font family/size as Atom. Independent settings for the REPL will be available in the next release.

Contributions

This package is originally based on the Term2 Atom package with heavy modifications. Feel free to submit bugs or issue pull requests.