[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] source code folding
From: |
Puneeth Chaganti |
Subject: |
Re: [O] source code folding |
Date: |
Mon, 28 May 2012 21:16:11 +0530 |
On Mon, May 28, 2012 at 8:42 PM, Petro Khoroshyy <address@hidden> wrote:
> Hi all.
> I can fold source code block using TAB key on begin_src block. Is there
> a shortcut to do it within source code block, without navigation to
> begin_src line?
I'm not sure there's such a short cut, but you can define one for yourself.
A simple function (without any sort of error checking) like the one
below can be bound to a key-binding of your choice.
------------------------------------------------------------------------
(defun my/collapse-src-block ()
"Collapses a source block when called from inside a block."
(interactive)
(org-babel-goto-src-block-head)
(org-cycle))
------------------------------------------------------------------------
Hope that helps,
Puneeth