|
From: | Colin S. Miller |
Subject: | Re: How to auto hide all functions when open a source file |
Date: | Sun, 11 May 2008 21:52:23 +0100 |
User-agent: | Icedove 1.5.0.14pre (X11/20080305) |
Ke Lu wrote:
Hi, I use emacs to edit c/c++/java/php files. Is there any way to auto hide all functions when I open a source file. For example,It hope it looks like Class XXX { var v1 = "a"; var v2 = "b"; function f1 .. function f2 .. } I would like it can automatic be done,not by hs-hide-block,etc.
Adding this code snippit to your .emacs . (add-hook 'hs-minor-mode-hook '(lambda () (hs-hide-all))) will do an auto hs-hide-all when you open a file that uses hs-minor-mode. However, it will also hide the classes' bodies, as well as any inline code. There might be a way to stop the hiding of the bodies, but I'm not sure what it is. HTH, Colin S. Miller
[Prev in Thread] | Current Thread | [Next in Thread] |