Take the 2-minute tour ×

I want to hide blocks of #ifdef and #ifndef blocks in C. Looks like I'd either need to use Folding mode or the Outline minor mode.

share|improve this question
add comment

2 Answers

up vote 5 down vote accepted

hide-ifdef-mode should do something like that. I have not used it myself though, but turn it on and read it's description with the commands below. It should be included with emacs.

M-x hide-ifdef-mode
C-h m
share|improve this answer
add comment

You can use folding-mode from Cedet

share|improve this answer
add comment

Your Answer


