Video The Julia REPL

Last updated: January 12, 2023

REPL modes

The Julia REPL has 4 modes:

julia>            Julian mode to run code. Default mode. Go back to it from other modes with Backspace

help?>            Help mode to access documentation. Enter it with ?

shell>            Shell mode to run Bash commands. Enter it with ;

(env) pkg>    Package manager mode to manage external packages. Enter it with ]

(env is the name of your current project environment. Project environments are similar to Python's virtual environments and allow you, for instance, to have different package versions for different projects. By default, it is the current Julia version. So what you will see is (v1.5) pkg>).

REPL keybindings

In the REPL, you can use standard command line (Emacs) keybindings:

C-c		cancel
C-d		quit
C-l		clear console

C-u		kill from the start of line
C-k		kill until the end of line

C-a		go to start of line
C-e		go to end of line

C-f		move forward one character
C-b		move backward one character

M-f		move forward one word
M-b		move backward one word

C-d		delete forward one character
C-h		delete backward one character

M-d		delete forward one word
M-Backspace	delete backward one word

C-p		previous command
C-n		next command

C-r		backward search
C-s		forward search

Comments & questions