slides.vim

Des slides dans votre vim - retour accueil

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

commit fbdf7ff2bd9aadc5f3db5332bcb38d30e57fdec5
parent f24f2fa020a476c7a34e7da9c2b24a68b98e3149
Auterice: Marc Chantreux <mc@unistra.fr>
Date:   Fri, 13 Oct 2023 11:17:50 +0200

first round of Agenda revamp

Diffstat:
Mftplugin/slides.vim | 14++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/ftplugin/slides.vim b/ftplugin/slides.vim @@ -51,18 +51,20 @@ setlocal fdm=expr fdo=all fcl=all foldexpr=getline(v:lnum)=~'›'?'>1':1 let b:show_agenda=v:true if !exists('*AgendaToggle') - command -nargs=0 AgendaShow + command -nargs=0 Agenda \ let b:show_agenda=v:true - \| setlocal foldtext=getline(v:foldstart) - command -nargs=0 AgendaHide + \| setlocal foldtext=substitute(getline(v:foldstart),\".*›\",\"\",\"\") + command -nargs=0 NoAgenda \ let b:show_agenda=v:false - \| setlocal foldtext=substitute(getline(v:foldstart),'.\\v(.*)','','') + \| setlocal foldtext='\ ' + " \| setlocal foldtext=substitute(getline(v:foldstart),'.\\v(.*)','','') fun AgendaToggle () - if b:show_agenda | AgendaHide - else | AgendaShow + if b:show_agenda | NoAgenda + else | Agenda endif endfun command -nargs=0 AgendaToggle call AgendaToggle() + command -nargs=0 -bang A <bang>?AgendaShow:AgendaHide endif AgendaToggle