Hi, I've just started using the prosper package and I happily discovered that
vim-latex lets me fold "slide" environments. Since I like to see the title of
each slide in the folded text, I made the enclosed patch (against the current
svn version of folding.vim), to turn this:

  \begin{slide}[options]{Title of the slide}
  ...
  ...
  \end{slide}

into this (when folded): 

  +-- 16 lines: slide () : Title of the slide

instead of just:

  +-- 16 lines: slide ()


(of course you must add "slide" to g:Tex_FoldedMisc in your
~/.vim/ftplugin/tex.vim to enable folding of slide environments)

Please note that it was a quick hack, maybe there's a cleaner way to do it;
maybe there are side-effects I've not considered, so give it a close look if you
plan to accept it (as if you wouldn't do :-)

Cri

-- 
GPG/PGP Key-Id 0x943A5F0E      -     http://www.linux.it/~cri/cri.asc
Free software, free society    -     http://www.fsfeurope.org
--- folding.vim.orig    2006-03-21 09:07:03.000000000 +0100
+++ folding.vim 2006-05-21 23:48:41.000000000 +0200
@@ -363,6 +363,9 @@
                        elseif getline(i) =~ '\\label'
                                let label = matchstr(getline(i), 
'\\label{\zs.*')
                                let label = substitute(label, '\zs}[^}]*$', '', 
'')
+                       elseif getline(i) =~ '\\begin{slide}'
+                               " The idea is to take the last block of "{...}" 
on a "\begin{slide}" line
+                               let caption = matchstr(getline(i), 
'\\begin{slide}[^{]*{\zs[^}]*\ze}$')
                        end
 
                        let i = i + 1

Attachment: signature.asc
Description: Digital signature

Reply via email to