-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreadme.slides
More file actions
395 lines (275 loc) · 9.67 KB
/
readme.slides
File metadata and controls
395 lines (275 loc) · 9.67 KB
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
› kiss github goodbye
clone clone and pull from
git://notebook.codelib.re/slides.vim.git
git format-patch --to=mc+slides.vim(A)unistra.fr
› slides.vim: simple slides made simple
~ 50 lines of vim config
WYSIWYG
emphasize/highlighted with non breaking spaces
easy mode switching (edition/presentation)
:set fen! list!
› when ?
need slides, have no time
prototyping
remote/collaborative display
› install
If you don't know about packs, I suggest to read `:help packages`.
If you don't care, just follow those instuctions.
mkdir ~/.vim/pack/slides.vim/start
git clone -C !$ git://notebook.codelib.re/slides.vim.git
› prototyping
▶ git revision
▶ lightweight as a text file
▶ autofolding: quick rearange
▶ WYSIWYG
› remote/collaborative display
▶ ssh forced command
▶ slides.vim + ii + tmux + ...
› cons ?
only text, code, emojis and all unicode but ...
vim customization (see emphasize slide)
!eog -f ~/slides*(o)& when things get visual
› system requirement
a fullscreen terminal
vim + slides.vim
your *.slides
› which term ?
Worth watching first: Features of a Modern Terminal Emulator
https://www.youtube.com/watch?v=9DgQqDnYNyQ
I tested terminology, gnome-terminal, st,
tilix, alacritty, kitty, coolretroterm.
› so which term ?
both kitty and tilix have
👍 good support of 256 colors term
👍 nice emoji rendering
👍 transparency and background
› SO which term ?
kitty renders "▒░" as a field of dots, which looks bad.
Also: it does too much things a terminal should not. It is useless,
bloats everything and confuse the newbies.
Also: now I heard GTK will drop the X backend, I'll drop as much
GTK apps as possible from my desktop, can't wait for Xlibre to be
packaged in debian (and will leave debian if not).
So far I use alacritty just because it's the last one I tested
which works fine and doesn't depend on gnome technologies.
› special mention: coolretroterm
Awesome theming for old school or futuristic/cyberpunk
looking.
Now available in debian package.
I used to use a docker file to build it:
(https://github.com/eiro/slides.vim/blob/master/tips.md)
› usage
# install slides.vim (:h packages)
# vim is now aware of .slides file extension
$ vim yourtalk.slides
› insertion mappings
(* ┃ ▶<space>
(- ┃ <space>
(" ┃ ›<space>
(5 ┃ <cr> <cr> <cr> <cr> <cr><esc>5kA
" TIP: whenever you want to edit (:h 'fen)
:set fen!
› presentation mappings
in normal mode
next slide ┃ PageDown
last slide ┃ PageUp
show/hide agenda ┃ :AgendaToggle<cr>
› emphasize
because some words are important
you can use npsp (alt-space) to
emphasize them.
› LoadTheme
the SlideRC command can abitrary vim code in the range
/^"<vim/,/^"vim>/
some examples coming...
› LoadTheme (define the flag)
so here is the way to turn a BWR (blue, white, red)
into a french flag
"<vim
syn match FranceFlagBlue "\vB{4}"
highlight FranceFlagBlue ctermbg=lightblue ctermfg=lightblue
syn match FranceFlagWhite "\vW{4}"
highlight FranceFlagWhite ctermbg=white ctermfg=white
syn match FranceFlagRed "\vR{4}"
highlight FranceFlagRed ctermbg=red ctermfg=red
"vim>
BBBBWWWWRRRR
BBBBWWWWRRRR
› LoadTheme (theming)
theming is basically redefining those 3 highlights:
"<vim
highlight SlideTitle cterm=bold ctermbg=blue ctermfg=white
highlight emphasize cterm=bold ctermfg=darkred ctermbg=none
highlight Folded cterm=none ctermbg=none ctermfg=white
"vim>
› possible improvements
resurect subsections the right way: 2 lines
section title
slide title
more highlighing possibilities
automatically gnome-screenshot every slide
to build a pdf version
› tips: editing
toggle numbers and folding (switch to edition mode)
:set nu! fen!
next slide
› tips: digraphs
:h digraphs
get the list of digraphs in a text file
:redir > ~/digraphs.txt
:digraphs
:redir END
:e ~/digraphs.txt
define a new digraph
" in zsh: print $[16#1F44D]
dig +1 128077
so now <c-k>+1 means 👍
› drawing with digraphs
draw charts and tables can be drawn
with digraphs:
vv │ vertical
hh ─ horizontal
vh ┼ vertical and horizontal
vr ├ vertical and right
lv ┤ left and vertical
dh ┬ down horizontal
uh ┴ up horizontal
ld ┐ left down
ur └ up right
and so on ...
› drawing with digraphs: examples
┌│┐ think border box:
└┘
4! ┊ 4-┈ 4_ ┉ 3- ┄
4/ ┋
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃RD LD ┃
┃Vr Vl ┃
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
┃ ┃
┃ ┃
┃ ┃
┃UR UL┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
› drawing with digraphs: tips
use numeral adjectives:
5i<c-k>vv gives you ─────
get used to <c-v> to resize cols:
<c-v>4l8jx to remove 4 char width
<c-v>8jx5p to add 4 char width
5i<c-k>vv gives you ─────
use upercase to bold:
<c-k>vv<c-k>VV gives you │┃
› maths and digraphs
<c-k>FA to get ∀ but also
α *a also greek alphabet is available with *
β *b
π *p
∏ *P
∀ FA
∈ (-
∞ 00
⌠ Iu
│ vv
⌡ Il
∑ +Z
∏ *P
› maths and digraphs
FE E │ TE ∃ │ /0 ∅ │ DE ∆ │ NB ∇ │ (- ∈ │ -) ∋ │
*P ∏ │ +Z ∑ │ -2 − │ -+ ∓ │ *- ∗ │ Ob ∘ │ Sb ∙ │
RT √ │ 0( ∝ │ 00 ∞ │ -L ∟ │ -V ∠ │ PP ∥ │ AN ∧ │
OR ∨ │ (U ∩ │ )U ∪ │ In ∫ │ DI ∬ │ Io ∮ │ .: ∴ │
:. ∵ │ :R ∶ │ :: ∷ │ ?1 ∼ │ CG ∾ │ ?- ≃ │ ?= ≅ │
?2 ≈ │ =? ≌ │ HI ≓ │ != ≠ │ =3 ≡ │ =< ≤ │ >= ≥ │
<* ≪ │ *> ≫ │ !< ≮ │ !> ≯ │ (C ⊂ │ )C ⊃ │ (_ ⊆ │
)_ ⊇ │ 0. ⊙ │ 02 ⊚ │ -T ⊥ │ .P ⋅ │ :3 ⋮ │ .3 … │
Eh ⌂ │ <7 ⌈ │ >7 ⌉ │ 7< ⌊ │ 7> ⌋ │ NI ⌐ │ (A ⌒ │
TR ⌕ │ Iu ⌠ │ Il ⌡ │ </ 〈│ /> 〉│ Vs ␣ │ Vs ␣ │
=> ⇒ │ == ⇔ │ -> → │ FA ∀ │ dP ∂
and more ... see :digraphs
› example
ℚ = { (𝑚 ,𝑛) | (𝑚 ,𝑛) ∈ ℤ Χ ( ℤ \ {0} ) }
› tips: emojis
iab :-) ☺️
iab xD 😃
iab x3 😍
iab :-( ☹️
iab :'( 😭
iab D:< 😱
iab :') 😂
iab :-O 😲
iab :-* 😘
iab :+1 👍
iab :-/ 🤔
iab :$ 😖
iab :-X 🤐
iab B) 😎
iab %) 😵
iab :## 🤢
iab !m! 🤘
iab ;-o 🤨
iab _ok 🗸
› tips: more emojis from gnome
if you're using gnome:
install gnome-characters and gnome-character-map
activate "characters" in gnome search
now you can search for "pile of " to get 💩
› more tips
just read tips.md
(https://github.com/eiro/slides.vim/blob/master/tips.md)
› Known bugs
you can't have more than 1 emphasize in a line
because (say X is nbsp):
Xem1XtextXem2X
you want to emphasize em1 and em2 but text also
is a region between 2 X so the whole line is
highlighted.
› history
written in 2009 because of a deadline
published in 2010 because of a deadline
evolved on my laptop since then because of deadlines
used at Journées Perl 2018
evolutions and documentation pushed to github
because someone wanted to know
› see also
I use to use slides.vim when I ran out of time.
Nowadays, unicode symbols and emojis are randered
nicely in terminals so I can do some nice looking
presentations using slides.vim.
to be productive with slides.vim, you should be
confortable with abbreviations (:h :iab)
and digraphs (:h :digr) and learn about the basic
ones.
I wasn't aware of vroom and it seems all the other
vim presentation plugins came after my own tool.
slides.vim became exactly what I want: 30 lines
of viml to produce slides in a very short time
with a look I really like so I have no reason to
just even test the other ones and the next slides
are probably unfair.
› other presentation tools
vroom (the only one I knew about in circa 2010)
https://metacpan.org/pod/distribution/Vroom/lib/Vroom.pod
vimdeck https://github.com/tybenz/vimdeck
git-slides https://github.com/gelisam/git-slides
presenting https://github.com/sotte/presenting.vim
pip slides https://pypi.org/project/slides.vim/
› stuck on slides.vim because
Probably too │ vimdeck
heavy/complicated │ vroom
│ pip slides
› stuck on slides.vim because
renders badly │ presenting
according to │ git-slides
screenshots │
› outside of vim
pandoc can turn markdown files into
a beamer file (latex class)
a reveal.js file
pug, stylus and livescript can used
in combinaison with
▶ pandoc + reveal.js
▶ impress.js
› Thank you
questions ?
fork me! http://github.com/eiro/slides.vim