Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
ESS support for julia language, among other things, includes font-lock, indentation, sending code to sub-process, interactive documentation, imenu, completion and eldoc.
Download ESS from git:
git clone git://github.com/emacs-ess/ESS.git
You will probably need to compile ESS, to ensure that julia-mode.el (the official editing mode from the Julia project) is downloaded. You can skip this step if you have julia-mode.el on your path already (e.g. from MELPA).
ess-site.el in your
.emacs and, unless your
julia-basic for older versions) is already in exec path, set
inferior-ess-julia-program-name to point to
(load "path/to/ESS/git/lisp/ess-site") (setq inferior-julia-program-name "/path/to/julia/julia")
To start julia type
M-x julia RET. You can start multiple julia processes if
you so desire.
To autostart or switch form script to julia subprocess use
C-c C-z. To switch
from process buffer to the most recent script buffer also use
C-c C-z. To
associate a buffer with a different julia process press
To send chunks of code from your script use
C-RET etc. To load
a whole file:
C-c C-l. See evaluating code section in ESS manual. (tip:
look up the documentation string of these commands with for example
C-h k C-c
To access documentation for any help topic or object use
C-c C-d C-d. To call
C-c C-d C-a. To look up for a topic in julia standard library
C-c C-d C-r. To look up a topic in the julia manual:
C-c C-d m. To
search julia website:
C-c C-d C-w.
To see all help commands defined in ess-doc-map:
C-c C-d C-h. See Help
section in ESS documentation.
ESS-julia already implements a subset of ess-tracebug functionality.
Use usual emacs commands for error navigation
C-x ` and
Julia conveniently reports the location of its own source files. In order to make
ESS to understand these links, add the julia’s source folders to
(add-to-list 'ess-tracebug-search-path "/path/to/julia/base/")
You can use imenu directly, but better with some sort of ido or helm completion mechanism such as imenu-anywhere.
Completion is available with
C-M-i. In process buffer
TAB can also be
used. By default, in script buffers,
TAB only indents. If you want
also complete, customize
From ESS13.09, julia mode supports comprehensive tab and AC completion. Completions is available for all accessible objects including modules and composite objects fields.
See also this page.
Eldoc is emacs way to non-intrusively display information on object under cursor. ESS-julia recognizes function at point and displays all the arguments for all defined methods for this function:
ESS ref-card might be also useful, though it covers quite some functionality for R and S which is not yet implemented for julia-mode as yet.