help-gnu-emacs
[Top][All Lists]
Advanced

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

program outlining


From: Rusi
Subject: program outlining
Date: Mon, 11 Jul 2016 05:59:59 -0700 (PDT)
User-agent: G2/1.0

Ive been trying to figure out the best outlining that emacs can give for
programs.

Outline-mode seems to be more for text than code
Outshine mode inspired by above+org-mode seemed promising in that it seems to
make org mode's wonderful TAB-behavior work for code.
But I couldn’t get it to work

So hideshow…
But hideshow keystrokes are clumsy

Even with the suggestions of
http://stackoverflow.com/questions/791539/how-can-i-have-folds-for-c-java-in-emacs
to do

(add-hook 'c-mode-common-hook
  (lambda()
    (local-set-key (kbd "C-c <right>") 'hs-show-block)
    (local-set-key (kbd "C-c <left>")  'hs-hide-block)
    (local-set-key (kbd "C-c <up>")    'hs-hide-all)
    (local-set-key (kbd "C-c <down>")  'hs-show-all)
    (hs-minor-mode t)))

its better than the builtin defaults but not nearly as neat as org's
all-purpose TAB and Shift-TAB.

Is it so hard to do org's TAB cycling
ie hs-show-block and hs-hide-block on the same key in cycle?


reply via email to

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