* Is any extension in Emacs can shrink and expand a block of code @ 2012-08-10 14:55 Qiang Yu 2012-08-10 16:48 ` drain 2012-08-10 17:04 ` Andreas Röhler 0 siblings, 2 replies; 3+ messages in thread From: Qiang Yu @ 2012-08-10 14:55 UTC (permalink / raw) To: help-gnu-emacs [-- Attachment #1: Type: text/plain, Size: 225 bytes --] 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 [-- Attachment #2: Type: text/html, Size: 299 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Is any extension in Emacs can shrink and expand a block of code 2012-08-10 14:55 Is any extension in Emacs can shrink and expand a block of code Qiang Yu @ 2012-08-10 16:48 ` drain 2012-08-10 17:04 ` Andreas Röhler 1 sibling, 0 replies; 3+ messages in thread From: drain @ 2012-08-10 16:48 UTC (permalink / raw) To: Help-gnu-emacs 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. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Is any extension in Emacs can shrink and expand a block of code 2012-08-10 14:55 Is any extension in Emacs can shrink and expand a block of code Qiang Yu 2012-08-10 16:48 ` drain @ 2012-08-10 17:04 ` Andreas Röhler 1 sibling, 0 replies; 3+ messages in thread From: Andreas Röhler @ 2012-08-10 17:04 UTC (permalink / raw) To: help-gnu-emacs Am 10.08.2012 16:55, schrieb Qiang Yu: > 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 > hs-minor-mode from hideshow.el see also cc-mode-help@lists.sourceforge.net ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-08-10 17:04 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-08-10 14:55 Is any extension in Emacs can shrink and expand a block of code Qiang Yu 2012-08-10 16:48 ` drain 2012-08-10 17:04 ` Andreas Röhler
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.