Groups
Groups
Sign in
Groups
Groups
gnu.emacs.help
Conversations
About
Send feedback
Help
Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss
Learn more
Is any extension in Emacs can shrink and expand a block of code
18 views
Skip to first unread message
Qiang Yu
unread,
Aug 10, 2012, 10:55:26 AM
8/10/12
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to help-gn...@gnu.org
Hi all,
Is there any extension in Emacs can shrink and expand a block of code?
For example:
int foo()
{
return 0;
}
the content in "{}" can be shrunk to like:
int foo()
{...}
and I can expand it back.
Regards,
yuq
drain
unread,
Aug 10, 2012, 12:48:23 PM
8/10/12
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Help-gn...@gnu.org
Add this to your .emacs:
;; collapsible code
(global-set-key "\C-x\M-h" 'hs-minor-mode)
(global-set-key "\C-c\C-h" 'hs-toggle-hiding)
(global-set-key "\C-c\M-h" 'hs-hide-all)
(global-set-key "\C-c\M-s" 'hs-show-all)
I suggest adjusting the particular bindings to your taste and style.
--
View this message in context:
http://emacs.1067599.n5.nabble.com/Is-any-extension-in-Emacs-can-shrink-and-expand-a-block-of-code-tp261127p261142.html
Sent from the Emacs - Help mailing list archive at Nabble.com.
Andreas Röhler
unread,
Aug 10, 2012, 1:04:18 PM
8/10/12
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to help-gn...@gnu.org
hs-minor-mode from hideshow.el
see also
cc-mod...@lists.sourceforge.net
0 new messages