-
Notifications
You must be signed in to change notification settings - Fork 0
eiro/slides.vim
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
› 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
clone git@github.com:eiro/slides.vim.git as a start section of a vim pack.
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@github.com:eiro/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
About
yet another WYSIWYG presentation editor
Resources
Stars
Watchers
Forks
Packages 0
No packages published