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: Dale Snell
Subject: Re: one key-press to comment out lines of code?
Date: Wed, 30 Apr 2014 14:12:15 -0700

On Wed, 30 Apr 2014 21:10:43 +0200
Emanuel Berg <address@hidden> wrote:

> Dale Snell <address@hidden> writes:
> 
> > Set point and mark to define the region.  Then do
> >
> >     C-x r t RET ; SPC RET
> 
> I'm I missing something crucial here?

Not really; this is just how I usually do that sort of thing.  I
first heard of M-; from this mailing list.  Alas, when it comes
time to (un-)comment a section of code or whatever, I never
remember it.  :-)  The rectangle commands are kinda ingrained into
my fingers.

> I think it is much better to use C-SPC, then move
> point, and then M-;. Meta is very close to the
> spacebar, where your left thumb is, and ; is right
> below your right little finger. Move the cursor with
> the super-ingrained C-e, C-n, etc., which are also
> short and close. And it is always the same, not just
> for Lisp.

On your keyboard, perhaps.  Mine's set up a bit differently (the
"Windows" keys are the Meta keys, the Alt keys, on either side of
the space bar, are the Alt keys.)  This makes folding my thumbs a
bit awkward.  Also, since I often run Emacs in a terminal window,
I wind up using the escape key as the Meta prefix.  I've been
doing that since the '80s (I started with Gosling Emacs on a
Pyramid computer), so I'm unlikely to change my ways at this late
date.  :-)

I'm happy with my slightly-less-efficient method.  You've got your
more-efficient method, and you're obviously happy with it.  As has
been said, there's more than one way to stack a cat.

Happy Emacsing,

--Dale

--
"If one would give me six lines written by the hand of the most
honest man, I would find something in them to have him hanged."
    -- Cardinal Richelieu



reply via email to

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