vlion: magical weaponized pony! (weaponized pony)
[personal profile] vlion2011-10-31 10:49 pm
Entry tags:

hs-mode

Hide-Show mode gives you the ability to code fold reasonably intelligently. Hit a key, fold the code. Hit a key, unfold the code. It's particular handy for Lisp use, I've noticed. I've been able to use it for Python as well.

Here's some snippets

(global-set-key "\M-`" 'hs-toggle-hiding)

(add-hook 'c-mode-common-hook 'hs-minor-mode)
(add-hook 'emacs-lisp-mode-hook 'hs-minor-mode)
(add-hook 'java-mode-hook 'hs-minor-mode)
(add-hook 'lisp-mode-hook 'hs-minor-mode)
(add-hook 'perl-mode-hook 'hs-minor-mode)
(add-hook 'sh-mode-hook 'hs-minor-mode)

Or, to start it, M-x hs-mode.


Reference: http://www.emacswiki.org/cgi-bin/wiki/HideShow
vlion: cut of the flammarion woodcut, colored (Default)
[personal profile] vlion2009-11-30 02:54 pm

fun things done with emacs: org-mode

* One of the Really Useful things I use Emacs is use the spreadsheet/table

layout function of org-mode.

* M-x org-mode gets you there.

* TAB tends to do the smart thing.

* | delimits a column.

* |- TAB expands a horizontal line

* Several nice export functions, including one in HTML.