Cool and fast loading REPL
This was a suggestion from Michael Fiano in a Zulip chat. It makes the startup really fast, and with a nice setup for OhMyREPL
. Install the packages first:
julia> import Pkg
julia> Pkg.add("Revise", "OhMyREPL", "Crayons", "BenchmarkTools")
And add the following to the ~/.julia/config/startup.jl
:
Base.atreplinit() do repl
@eval begin
@async @eval using Revise
@async @eval using BenchmarkTools
import OhMyREPL as OMR
import Crayons as C
promptfn() = "(" * splitpath(Base.active_project())[end-1] * ") julia> "
OMR.input_prompt!(promptfn)
OMR.colorscheme!("OneDark")
OMR.enable_pass!("RainbowBrackets", false)
OMR.Passes.BracketHighlighter.setcrayon!(C.Crayon(foreground=:blue))
end
end
From this thread (probably the link will be broken).