Skip to content

Commit

Permalink
rewrote the repl stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
lmiq committed Sep 8, 2023
1 parent a173d7e commit 18d7a8a
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 32 deletions.
2 changes: 1 addition & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ makedocs(
sitename="JuliaNotes.jl",
pages = [
"Home" => "index.md",
"Cool and fast REPL" => "fastrepl.md",
"REPL tips at startup.jl" => "startup.md",
"Development workflow" => "workflow.md",
"Modules and Revise" => "modules.md",
"Scope of loops" => "loopscopes.md",
Expand Down
31 changes: 0 additions & 31 deletions docs/src/fastrepl.md

This file was deleted.

39 changes: 39 additions & 0 deletions docs/src/startup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# REPL tips at startup.jl

This is my current (as of September 2023) `.julia/config/startup.jl` file:

```
using Revise, BenchmarkTools
import OhMyREPL
import Pkg
Pkg.UPDATED_REGISTRY_THIS_SESSION[] = true
insert!(LOAD_PATH, 2, mktempdir())
OhMyREPL.colorscheme!("TomorrowNightBright")
```

- `Revise` and `BenchmarkTools` are important development tools.
- `OhMyREPL` is responsible for syntax highlighting in the REPL.

Install first these packages with:

```julia-repl
julia> import Pkg; Pkg.add(["Revise", "BenchmarkTools", "OhMyREPL"])
```

With `Pkg.UPDATE_REGISTRY_THIS_SESSION[] = true` Julia will not try to download
the latest version of every package all the time when installing a package in
a new environment. This is nice to avoid many unnecessary downloading and
recompilation runs.

With `insert!(LOAD_PATH, 2, mktempdir())`, a temporary environment is added
to the list of default environments. This is useful because, when installing
a package automatically after a `using Package` command, one is prompted (by chossing the `o`)
in which environment the package is to be installed. Choosing the tempororary
one (which will be selected by default) will avoid clutering the global environment.
In combination with the above update-registry option, this avoids may recompilation
runs.

The last line is my preferred color scheme.



0 comments on commit 18d7a8a

Please sign in to comment.