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.
- macOS Serria
- Intellij IDEA
- Mathematica 11.0 or later
-
Download the latest MathematicaREPL.zip.
[ https://github.com/unchartedworks/MathematicaREPL/releases ]
-
Open the Preferences dialog (e.g. ⌘,).
-
In the left-hand pane, select Plugins.
-
In the right-hand pane, click Install plugin from disk… button.
-
Select the downloaded MathematicaREPL.zip and click Open button.
-
Click OK button and then click Restart button to restart Intellij IDEA.
Please make sure your Intellij IDEA’s keymap is Mac OS X 10.5+, otherwise the shortcuts above might not work.
- Open the Preferences dialog (e.g. ⌘,).
- In the left-hand pane, select Keymap.
- In the right-hand pane, select the "Mac OS X 10.5+" from the dropdown.
⌘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.
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.
-
Download the template project Hello.zip.
[ https://github.com/unchartedworks/MathematicaREPL/releases ]
-
Unzip Hello.zip
-
Run Intellij IDEA and open directory Hello.