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

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

Re: one key-press to comment out lines of code?


From: Michael Heerdegen
Subject: Re: one key-press to comment out lines of code?
Date: Wed, 30 Apr 2014 19:18:31 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.90 (gnu/linux)

Michael Heerdegen <michael_heerdegen@web.de> writes:

> > Others will no doubt tell you to use `M-;' (`comment-dwim') after
> > selecting the text.
> >
> > I prefer to use `comment-region', which I bind to `C-x ;'.
>
> And to select the current sexp, do C-M-h.

BTW, another method is to just insert a quote char ' before the sexp.
While it has the same effect of commenting out, this has the advantage
that you can still edit the sexp normally, you can e.g. still copy parts
of it to another position etc. without the need to uncomment or restore
a destroyed paren structure.

Michael.




reply via email to

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