help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: folding-mode question


From: Tim X
Subject: Re: folding-mode question
Date: Wed, 08 Dec 2010 15:29:46 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Marc Mientki <mientki@nonet.com> writes:

> Am 24.09.2010 02:17, schrieb tomer:
>> On Sep 22, 12:45 pm, Marc Mientki<mien...@nonet.com>  wrote:
>>> Am 22.09.2010 11:47, schrieb tomer:
>>>
>>>> Thanks for the answer I
>>>> work with a language called "e" (hardware verification langauge) it
>>>> looks like C but not exactly.
>>>> am I still able to use hideshow ?
>>>
>>> I would simply switch to c-mode and see what happens.
>>>
>>> regards
>>> Marc
>>
>> I have tried it is not practical.
>> the folding is great because it not language related.
>
> What would you say what is the benefit of code folding?
> I've never used folding. After I've tried this out I was so
> dissapointed. This was never interested to me. My "mystery
> theory" is that peole who advocate code folding never seen
> realy good text editor with superb navigation mechanism like
> Emacs. But maybe I'm wrong and I underrate code folding.
>

I would say your theory is very weak. I've seen many people who are very
expereinced and knowledgable emacs users use it and like it. 

I don't tend to use it much anymore, but the languages I use and my
style has changed. However, it can be very useful. 

One reason I liked it was that by using well structured folding markers,
you could have a screen that showed not only the current code you are
editing, but also summary information about other bits of code in the
buffer. This means that often, you could get a quick reminder without
having to navigate or move from hour current position at all. For
example, when writing lots of Java code, I used folding mode so that in
my buffer, I had folding marks that also showed the arguments and return
values of other methods etc in my class. I found this useful because I
could just look up and see what the arguments were for a method I'd
defined higher/lower in the file - no need to move my cursor at all, no
need to navigate anywhere - essntially, I got more useful real-estate
use out of my screen. I also found as a side effect, that using folding
mode tended to encourage better code layout. Related things ended up
grouped together without me really having to actively think about this.
I also found it made navigation even easier. Emacs has great navigation
support, but that doesn't mean you shouldn't use other tools to make
that navigation even easier. With folding mode, you can naviage to a
location in the file with even less keystrokes. Combine this with some
key bindings to make adding folding marks easier and you get the best of
both worlds. 

Tim

-- 
tcross (at) rapttech dot com dot au


reply via email to

[Prev in Thread] Current Thread [Next in Thread]