slides.vim

Des slides dans votre vim - retour accueil

git clone git://bebou.netlib.re/slides.vim
Log | Files | Refs |

commit e2f1949036d40af902a568649f165119842c92a2
parent 0a8de516ef843b2c05d9cfc94b48c36dc786ea76
Auterice: Marc Chantreux <khatar@phear.org>
Date:   Sat, 19 May 2018 16:50:21 +0200

journées perl edition

* demo renamed readme do gitub should be happy
  to show it. also improved (with usage documentation)
* ftplugin/slides.vim evolved one line a time
  during many years and i haven't realized
  it evolved that far. i just push the last version
* i added a tips file where i'll push more tips about it

Diffstat:
Ddemo.slides | 71-----------------------------------------------------------------------
Mftplugin/slides.vim | 71+++++++++++++++++++++++++++++++++++++++++++++--------------------------
Areadme.slides | 138+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Atips.md | 32++++++++++++++++++++++++++++++++
4 files changed, 215 insertions(+), 97 deletions(-)

diff --git a/demo.slides b/demo.slides @@ -1,71 +0,0 @@ - Slides.vim - -  spreading my world domination plan -  with no effort - - - So I need -  Fast edition -  vim: fold, bind, map, script... -  git revision -  autofolding: quick rearange -  WYSIWYG -  -  live -  interaction -  live demo -  "what if ... ?" -  -  fixing -  real live beamer frustration -  i don't fix slides because of *YOU* -  -  multimedia -  images -  animation -  -  easy theming and resize -  - - System requirement - -  a fullscreen terminal -  vim -  ~/.vim/plugin/slides.vim -  ~/.vim/ftplugin/slides.vim -  your *.slides - - - ~/.vim/ftplugin/slides.vim - -  written in few minutes -  11 lines of code -  WIP (syntax highlight, ...) -  ideas and patches are welcome - - - Use it - -  ,, to create a new slide -  or a subslide -  or a subsubslide -  ... - Endless ? -  -  -  -  -  this file is a good example -  everything else is vim ( zj, zk, ...) -  ~/.vim/ftplugin/slides.vim comments -  the awesome vim documentation -  :h fold.txt -  :h digraphs - - - Thank you - -  questions ? -  fork me! http://github.com/eiro - - diff --git a/ftplugin/slides.vim b/ftplugin/slides.vim @@ -1,30 +1,49 @@ +" vim: fdm=indent " digraphs -"  = ", -"  = "( -"  = "" - -" :h fold.txt is a must but you'll basically use zj and zk -" - -setlocal nonu cursorline so=999 - \ laststatus=0 fdm=marker - \ foldmarker=, - \ foldtext=substitute(getline(v:foldstart),'.\\v(.*)','\\1\ \ \','') - -" in normal and insert mode ,, to add a slide -inoremap ,, <c-k>",<cr><cr><c-t><c-k>"( <cr><c-d><cr><c-k>""<c-o>4k<space><space> -nmap ,, o,, - -" ,z pipe a line to zsh -nnoremap ,z :.w !zsh<cr><cr> -" ,v show images from qiv -f -nnoremap ,v :.w !xargs qiv -f<cr><cr> -nnoremap <buffer> <PageUp> zk -nnoremap <buffer> <PageDown> zj - -" Presentation mode open and close folders automatically +" ‹ = 1< +" › = 1> + +" edition commands: + inoremap <buffer> (* ▶<space> + inoremap <buffer> (- <space> + inoremap <buffer> (" ›<space> + inoremap <buffer> (5  <cr> <cr> <cr> <cr> <cr><esc>5kA + +" presentation command + nnoremap <buffer> <PageUp> zkzt + nnoremap <buffer> <PageDown> zjzt + +" Theme: + set fcs=fold:\ ,diff:\ + highlight CursorLine cterm=bold ctermbg=blue ctermfg=white + highlight Folded cterm=none ctermbg=none ctermfg=white + set statusline=0 noshowmode noruler noshowcmd + setlocal nonu cursorline so=0 laststatus=0 + +" every slide starts with a › +set fdm=expr foldexpr=getline(v:lnum)=~'^\ *›'?'>1':1 + +let b:show_agenda=v:true +command -nargs=0 AgendaShow + \ let b:show_agenda=v:true + \| set foldtext=substitute(getline(v:foldstart),'.\\v(.*)','\\1\ \ \','') +command -nargs=0 AgendaHide + \ let b:show_agenda=v:false + \| set foldtext=substitute(getline(v:foldstart),'.\\v(.*)','','') + +fun AgendaToggle () + if b:show_agenda | AgendaHide + else | AgendaShow + endif +endfun + +command -nargs=0 AgendaToggle call AgendaToggle() + +" " Presentation mode open and close folders automatically command -nargs=0 Presentation set fdo=all fcl=all Presentation +AgendaToggle -" Edition mode reset default folding behavior -command -nargs=0 Edition set fcl= fdo=block,hor,mark,percent,quickfix,search,tag,undo +" Dead code ? ( just toggle foldenable? ) + " Edition mode reset default folding behavior + " command -nargs=0 Edition set fcl= fdo=block,hor,mark,percent,quickfix,search,tag,undo diff --git a/readme.slides b/readme.slides @@ -0,0 +1,138 @@ +› slides.vim + + simple slides made simple 😍 + +› why ? + +  need slides, have no time +  prototyping +  remote/collaborative display + +› 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, emoji and ascii art +  also vim customization + +› system requirement + +  a fullscreen terminal +  vim + slides.vim +  your *.slides + +› which term ? (gnome terminal) + + 👍 good support of 256 colors term + 👍 nice emoji rendering + +› which term ? (terminology) + + 👍 transparency, background + 👍 better look + ? support images ? + +› which term ? (to test) + +  web based terminal ? (mixed with animation?) +  coolretroterm ? (fun old school looking demos :)) + +› 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> + +› tips: editing + +  toggle numbers and folding (switch to edition mode) + :set nu! fen! +  next slide + /^› + +› tips: digraphs + + :h digraphs + VV ┃ vertical + HH ┃ horizontal + LD ┓ left down + RU ┗ right up + ... + and so on ... +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃RD LD ┃ +┃Vr Vl ┃ +┣━━━━━━━━━━━━━━━━━━━━━━━━━━━┫ +┃ ┃ +┃ ┃ +┃ ┃ +┃UR UL┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + +› 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 +  activate "characters" in gnome search +  now you can search for "pile of " to get 💩 + +› more tips + + just read tips.md + +› Thank you + +  questions ? +  fork me! http://github.com/eiro/slides.vim + diff --git a/tips.md b/tips.md @@ -0,0 +1,32 @@ +# live questions (slides + tmux + vim) + +I was unable to make it to the Journées Perl 2018 so i gave my talk remotely. +As Kai asked what was my slides system, i'll describe it. + +first, i started the irc client and joined the channel: + + ii -s irc.perl.org -n eiro + echo "/join #mongueurs" > ~/irc/irc.freenode.net/in + +then i started a terminal (terminology with solarized_light theme) +and run a tmux session with 2 panes: + + tmux \ + new -s jp18 \ + vim readme.slides \;\ + split-window -dbl2 \ + tail -fn0 /home/mc/irc/irc.perl.org/\#mongueurs/out + +so the layer is + + ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ + ┃questions from irc ┃ + ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━┫ + ┃ ┃ + ┃ journées perl slides ┃ + ┃ ┃ + ┃  bullet ┃ + ┃  bullet ┃ + ┃ ┃ + ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ +