forked from marconilanna/REPLesent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tour.txt
167 lines (110 loc) · 3.41 KB
/
tour.txt
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
| \gWelcome to REPLesent!
REPLesent is a neat little tool to build presentations with the Scala REPL
---
| \gBasics
Creating presentations is very easy.
All you need is a plain text file. Anything you write in the file is
displayed on the screen, centered vertically and horizontally.
To separate slides, just put three dashes (\r---\s) on a line by themselves.
---
| \gBuilds (Incremental Slides)
It is also possible to create "builds", where a slide is displayed
incrementally, step by step, like bullet points in Powerpoint.
Builds are separated by two dashes (\r--\s) on a line by themselves.
--
\*Phase 1\s: Collect underpants
--
\*Phase 2\s: ?
--
\*Phase 3\s: Profit
---
| \g Navigation
You have the full arsenal of navigation options at your disposal:
* Next and previous build
* Next and previous slide
* First and last slide
* Advance or go back any number of slides
* Jump to slide number
---
| \gText Alignment
Text can be aligned with ease.
<< '\r<< \s' flushes the line to the left of the screen.
< '\r< \s' aligns the line to the left of the slide (default).
| '\r| \s' centers the line.
> '\r> \s' aligns the line to the right of the slide.
>> '\r>> \s' flushes the line to the right of the screen.
Whitespace is preserved, you can easily align manually if needed.
---
| \gANSI Color Support
\rOh \gmy \bgosh, \cit's \mfull \yof \scolors\r!\g!\b!\c!\m!\y!\w!\k!
\rred\s \ggreen\s \bblue\s \kblack
\ccyan\s \mmagenta\s \yyellow\s \wwhite
\*Bold\s:
\*\rred\s \*\ggreen\s \*\bblue\s \*\kblack
\*\ccyan\s \*\mmagenta\s \*\yyellow\s \*\wwhite
Background:
\Rred\s \Ggreen\s \Bblue\s \Kblack
\Ccyan\s \Mmagenta\s \Yyellow\s \Wwhite
\_Underline\s and \!reverse\s also supported.
---
| \gHorizontal Rulers
You can start a line with a forward slash '\r/\s' to
create a horizontal line across your slide:
/
Double slashes '\r//\s' create a line across the entire screen:
//
You can specify custom patterns.
Be creative, use Unicode and ANSI colors!
/=+
/\r=\s\**\s\r=\b=\s\**\s\b=
/ ⚡ ☁
---
| \gSyntax Highlighting
Basic support for syntax highlighting is also provided.
Just surround your Scala code with the \r```\s delimiter.
```
import scala.util._
var a = 42
def f(i: Int) = i + 1
sealed trait A
private object B extends A
case class Person(name: String)
try { 1 / 0 } catch { case e: Exception => 0 }
if (this == null) true else false
for (i <- 1 to 10) yield i * i
```
---
| \gRunning Code
Now, what I personally consider to be the coolest feature of them all:
| \*Running Scala code straight from your slides!
```
val a = 2
val b = 3
a * b
```
Just enter '\b!!\s' or '\br\s' and see the Scala REPL execute the code
above as if you had typed it yourself directly in the prompt.
---
That was pretty cool, eh? But it gets better.
Remember we defined vals \ba\s and \bb\s in the previous slide?
Any slide can now refer to those variables. They are still in scope.
```
val c = a + b
```
--
You can put multiple pieces of code in the same slide, separated
by builds or not. They all get executed properly.
--
Let's first define a new value:
```
val last = a + b + c
```
And then use it:
```
for (i <- 1 to last) yield i * i
```
---
And here ends our adventure.
Thank you for patiently watching this tour.
The included tutorial provides more detailed instructions for you.
I will leave you with one last command: '\bh\s'.