/MathematicaREPL

MathematicaREPL plugin (macOS only) for IntelliJ IDEA

Primary LanguageMathematicaMIT LicenseMIT

MathematicaREPL for IntelliJ IDEA (macOS only)

Introduction

MathematicaREPL allows you to evaluate your Mathematica code from Intellij IDEA and display results in a Mathematica notebook. This is a missing feature of Mathematica Support plugin.

Key features of the MathematicaREPL include:

  • REPL ⌘5 or ⌘R

    Evaluates code and display results in Mathematica notebook.

  • Find Selected Function ⇧⌘F

    Opens documentation about the selected function.

Binary Installation

System Requirements

  • macOS Serria
  • Intellij IDEA
  • Mathematica 11.0 or later

Install MathematicaREPL plugin

  1. Download the latest MathematicaREPL.zip.

    [ https://github.com/unchartedworks/MathematicaREPL/releases ]

  2. Open the Preferences dialog (e.g. ⌘,).

  3. In the left-hand pane, select Plugins.

  4. In the right-hand pane, click Install plugin from disk… button.

  5. Select the downloaded MathematicaREPL.zip and click Open button.

  6. Click OK button and then click Restart button to restart Intellij IDEA.

Configure Intellij IDEA

Please make sure your Intellij IDEA’s keymap is Mac OS X 10.5+, otherwise the shortcuts above might not work.

Select Keymap

  1. Open the Preferences dialog (e.g. ⌘,).
  2. In the left-hand pane, select Keymap.
  3. In the right-hand pane, select the "Mac OS X 10.5+" from the dropdown.

Solve shortcut conflict

⌘R is the preferred shortcut to evaluate code, however ⌘R is a predefined shortcut in keymap “Mac OS X 10.5+”, if you want to use ⌘R to evaluate code, you can just remove the shortcut for “Replace” in keymap “Mac OS X 10.5+”, otherwise you can use ⌘5 instead.

Build and Run

It's important to use the template project to develop your Wolfram code. If you use the other project, it might not work. MathematicaREPL might not be able to find the REPL notebook. In this case, Hello.nb is the REPL notebook.

  1. Download the template project Hello.zip.

    [ https://github.com/unchartedworks/MathematicaREPL/releases ]

  2. Unzip Hello.zip

  3. Run Intellij IDEA and open directory Hello.

  4. Select Hello.m

  5. Press ⌘R to evaluate Hello.m.