Fold

2 views
Skip to first unread message

Rui Carlos Gonçalves

unread,
Feb 17, 2009, 12:27:20 PM2/17/09
to Vim mailing list
Hi,

I'd like to know if is it possible automatically fold the lines
between the text "\begin{comment}" and "\end{comment}".

Best regards,
Rui Carlos Gonçalves

Garrett Whelan

unread,
Feb 17, 2009, 2:18:16 PM2/17/09
to vim...@googlegroups.com
Not to be snide, but I would start with
:help fold.txt

There's more to folding then doing a single command.

Roberto Miura Honji

unread,
Feb 17, 2009, 6:04:39 PM2/17/09
to vim...@googlegroups.com
look this:
help 'foldmethod'
help 'foldmarker'

for example:
/* bla bla bla and bla
   bla next line
*/

to fold this, you can set.
set foldmethod=marker
set foldmarker=/*,*/

2009/2/17 Garrett Whelan <whal...@gmail.com>



--
----------------------------------------------
Roberto Miura Honji
LAS - Laboratório de Administração e Segurança de Sistemas
Engenharia de Computação - 2006
Instituto de Computação - UNICAMP

email: miura...@gmail.com (principal)
email: ra06...@students.ic.unicamp.br
msn:   miura...@msn.com
-------------------------------------------

Rui Carlos Gonçalves

unread,
Feb 18, 2009, 5:22:07 AM2/18/09
to vim...@googlegroups.com
Problem solved.

Thanks

Ted Pavlic

unread,
Feb 18, 2009, 8:03:55 AM2/18/09
to vim_use, Vim mailing list
> I'd like to know if is it possible automatically fold the lines
> between the text "\begin{comment}" and "\end{comment}".

Also note that the Vim-LaTeX suite has folding enabled for many common
LaTeX environments (like this one). You can use their implementation as
an example and/or add your own.

--Ted


--
Ted Pavlic <t...@tedpavlic.com>

Please visit my ALS association page:
http://web.alsa.org/goto/tedpavlic
My family appreciates your support in the fight to defeat ALS.

Reply all
Reply to author
Forward
0 new messages