[Top][All Lists]

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

RE: Commenting Multiple Lines

From: Drew Adams
Subject: RE: Commenting Multiple Lines
Date: Sun, 18 Sep 2011 14:27:24 -0700

> I use C-c C-c to comment multiple lines, to un-comment multiple
> lines the tutorial says give negative argument and C-c C-c. 
> How to provide negative argument ?

Deniz already answered your negative-argument question.

But which command do you have bound to `C-c C-c'?
(You can use `C-h k' to find out.)

There are various ways to comment and uncomment multiple lines.
One way is to use command `comment-dwim', bound by default to `M-;'.
Jambunathan suggested using this.

"DWIM" means "do what I mean", and the idea is that the command
does different things in different contexts, but what it does is
always the right thing (what you meant) for each context.

FWIW, I find that "DWIM" is often misguided and presumptuous.
It too often really means "do something the command author thought
would be the right thing".

Personally, I prefer to use command `comment-region', which I bind
to `C-M-;'.  With a plain prefix argument (i.e., `C-u') it
uncomments the region.  It's an old command, simple and dependable.
It's not dwim: it never second-guesses you.

Use `C-h f' to find out more about any given function (e.g., command).

reply via email to

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