emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] newcomment.el (comment-line): New command.


From: Artur Malabarba
Subject: Re: [PATCH] newcomment.el (comment-line): New command.
Date: Tue, 27 Jan 2015 00:35:31 -0200

On 26 Jan 2015 20:41, "Stefan Monnier" <address@hidden> wrote:
>
> > Is there any particular reason why there's no `comment-line' command
> > in Emacs?
>
> Probably because the question goes both ways: is there any particular
> reason we'd need a comment-line command?
>
>    C-a C-SPC C-n M-;
>
> works for me when I need it.  M-x comment-line RET is much longer (even
> if you shorten it with something like partial-completion), so for such
> a command to make sense, you'd need a key binding for it.

Yes, you would. I didn't mention keybinds yet, because I was tackling this by parts.

I bind it to `C-;'. Another viable key might be `C-M-;'. But it definitely needs a key.
When you want to comment/uncomment something between 1 and 9 lines, it always requires less keypresses than the M-; alternative.

Besides, commenting a single line is such a common scenario, I find it deserves a single key instead of a 4 key combo.

It's also something that a lot of IDE's assign to a hotkey, so I'm sure I'm not the only one that finds it useful. :-) And people who come from other editors are sure to miss it.


reply via email to

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