Hi,

I also like to see this feature. For reference, here is a slightly
improved version of the script that falls back to the normal foldtext()
and that keeps the indentation:

fun My_c_fold_line()
        let line = getline(v:foldstart)
        if line =~ '^\s*/\*\*\?\s*$'
                return repeat(" ", indent(v:foldstart)) . 
matchstr(getline(v:foldstart+1),'\S.*')
        else
                return foldtext()
        endif
endfun

I use that with:

au FileType cpp set foldtext=My_c_fold_line()

Greetings,
Joachim

-- 
Joachim "nomeata" Breitner
Debian Developer
  nome...@debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C
  JID: nome...@joachim-breitner.de | http://people.debian.org/~nomeata

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

Reply via email to