Skip to content

Configuring Editors

ViralBShah edited this page Feb 25, 2012 · 2 revisions

Configuring editors to display the code nicely is always good.

Emacs

In the git version c contains a julia-mode path-to-julia/contrib/julia-mode.el.(Note: that may change, please in that case update) Adding the following to ~/.emacs should work:

(add-to-list 'load-path "path-to-julia/contrib/") ;Tell emacs to look for the file there.
(require 'julia-mode)                             ;Tell it to load it.
(setq auto-mode-alist                             ;Tell it to go to julia-mode when a Julia file(.j) is spotted.
      (append '(("\\.j$" . julia-mode)) auto-mode-alist))

Maybe you do not want to add the folder, alternatively omit the first line and

cd where-you-keep-your-elisp-files
ln -s path-to-julia/contrib/julia-mode.el julia-mode.el

Vim

Instructions for installing Vim support for Julia can be found in the julia-vim repo, which provides pathogen, vbundle, and manual installation options.

TextMate

Copy (or symlink) the TextMate Julia bundle into the TextMate application support directory:

cp -r JULIA_PATH/contrib/Julia.tmbundle ~/Library/Application\ Support/TextMate/Bundles/

where JULIA_PATH is the location of the top-level julia directory. Now select from the menu in TextMate Bundles > Bundle Editor > Reload Bundles. Julia should appear as a file type and be automatically detected for files with the .j extension.

Other editors

If you figured out how to do it for other editors, dont hold back!

Clone this wiki locally