-
Notifications
You must be signed in to change notification settings - Fork 6
/
.iex.exs
27 lines (26 loc) · 901 Bytes
/
.iex.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
IEx.configure(
colors: [
enabled: true,
eval_result: [ :cyan, :bright ],
eval_error: [ :light_magenta ],
],
default_prompt: [
"\r\e[38;5;220m", # a pale gold
"%prefix", # IEx context
"\e[38;5;112m(%counter)", # forest green expression count
"\e[38;5;220m>", # gold ">"
"\e[0m", # and reset to default color
]
|> IO.chardata_to_string
)
# use the following snippet to always print out the colorful output and not stop and pry:
Application.put_env(:elixir, :dbg_callback, {Macro, :dbg, []})
# Because I hate not being able to exit IEx without killing the process:
# Note that control-\ will do the same thing, but my Rails muscle memory is too strong
defmodule CustomIExFunctions do
def exit do
IO.puts("Exiting...")
System.halt # also :init.stop might work here
end
end
import CustomIExFunctions