Bug#460897: Doxygen-Folding in vim

Joachim Breitner nomeata at debian.org
Tue May 19 11:11:26 UTC 2009


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
  nomeata at debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C
  JID: nomeata at joachim-breitner.de | http://people.debian.org/~nomeata
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://lists.alioth.debian.org/pipermail/pkg-vim-maintainers/attachments/20090519/7d616c5b/attachment.pgp>


More information about the pkg-vim-maintainers mailing list