This page is about library hide-comnt.el and related features.
hide-comnt.el provides two commands, a macro, and a user option:
‘hide/show-comments’ – Does what its name says. If the region is active then hiding is limited to the region. With a prefix argument, hidden comments are shown again.‘hide/show-comments-toggle’ – Toggles hiding/showing in the active region, or the whole buffer if the region is inactive.‘with-comments-hidden’ – Temporarily hides comments while it executes a body of code. You do not see the commented text disappear and reappear – it is effectively just ignored while processing the body. The macro uses ‘hide/show-comments’ to hide the comments.‘ignore-comments-flag’ – If ‘nil’, then ‘with-comments-hidden’ does not ignore comments.‘next-visible-thing’ and ‘previous-visible-thing’, in library thing-cmds.el, use macro ‘with-comments-hidden’, so they ignore things that are in commented code.C-M-;’ in the minibuffer toggles option ‘ignore-comments-flag’.‘icicle-search-thing’ respects the option: when non-‘nil’ it ignores (does not search) ThingAtPoint things that are commented out.‘icicle-next-visible-thing’ and ‘icicle-previous-visible-thing’ are similar to ‘next-visible-thing’ and ‘previous-visible-thing’ from thing-cmds.el.Added an ELPA package of this library for download here: http://www.wisdomandwonder.com/link/6390/hide-or-ignore-comments-elpa-package – GrantRettke?
Noticed that it does not quite work for Ruby files, attaching a screenshot that illustrates the problem. Any idea? – [[gnufied?]]
That screenshot does not show up, for me anyway. Please post the screenshot to EmacsWiki, e.g., here (click the `?’ link, then upload your image to that page):
But I doubt that an image will be enough to help me understand the problem (and I know little about Ruby). You will likely need to investigate a bit further what happens, perhaps using the Lisp debugger. IOW, for me, at least, to be able to help you, you will need to provide more info. – DrewAdams