[Top][All Lists]

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

Re: code folding with <backtab> ?

From: Andreas Röhler
Subject: Re: code folding with <backtab> ?
Date: Mon, 09 Apr 2012 12:54:27 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; de; rv: Gecko/20120306 SUSE/3.1.20 Thunderbird/3.1.20

Am 08.04.2012 11:37, schrieb Yagnesh Raghava Yakkala:

Hello Bastien,

Bastien<address@hidden>  writes:

Yagnesh Raghava Yakkala<address@hidden>  writes:

To begin with elisp, can anybody tell me how to make backtab to show the
outline of the buffer at least for two levels. I mean first press would show
me buffer folded upto top level comments, defuns, defcustoms and defvars
and the second press would show me entire buffer.

Add a hook to use `orgstruct-mode' in emacs-lisp buffers:

   (add-hook 'emacs-lisp-mode-hook 'orgstruct-mode)

Define a new `org-cycle-global' command:

   (defun org-cycle-global () (interactive) (org-cycle t))

Set this keybinding:

   (global-set-key (kbd "<backtab>") 'org-cycle-global)

Wow this is great, working nice too (except when point is at the end of
buffer). I didn't think, Org itself can be used here. I wonder why its not
working with other programming modes, say perl and python.


a feature request for now

reply via email to

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