-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_iex.exs
67 lines (59 loc) · 1.5 KB
/
dot_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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
alias IO.ANSI
IO.puts(
"#{ANSI.blue()} #{ANSI.magenta()} Welcome to Elixir #{ANSI.blue()} #{ANSI.reset()}\n"
)
# Editor to open code in using `open` function
System.put_env("ELIXIR_EDITOR", "kitty --execute #{System.fetch_env!("EDITOR")} __FILE__ &")
# Prevent dbg() from adding a breakpoint and dropping into pry
Application.put_env(:elixir, :dbg_callback, {Macro, :dbg, []})
IEx.configure(
colors: [
syntax_colors: [
number: :light_yellow,
atom: :light_cyan,
string: :white,
boolean: :red,
nil: [:magenta, :bright]
],
ls_directory: :cyan,
ls_device: :yellow,
doc_code: :green,
doc_inline_code: :magenta,
doc_headings: [:cyan, :underline],
doc_title: [:yellow, :bright, :underline]
],
default_prompt:
"#{ANSI.green()}%prefix#{ANSI.reset()}" <>
"[#{ANSI.magenta()}#{ANSI.reset()}" <>
"#{ANSI.cyan()}%counter#{ANSI.reset()}]",
alive_prompt:
"#{ANSI.green()}%prefix#{ANSI.reset()}" <>
"(#{ANSI.yellow()}%node#{ANSI.reset()}) " <>
"[#{ANSI.magenta()}#{ANSI.reset()}" <>
"#{ANSI.cyan()}%counter#{ANSI.reset()}]",
history_size: 200,
inspect: [
charlists: :as_lists,
pretty: true,
limit: 50,
width: 80
],
width: 80
)
defmodule MyHelpers do
def cl do
IEx.Helpers.clear()
end
def ll do
IEx.Helpers.clear()
end
@doc """
Shortcut for:
`IEx.Helpers.recompile()`
"""
def rc do
IEx.Helpers.recompile()
end
end
import MyHelpers
require Integer