emacs-devel
[Top][All Lists]
Advanced

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

Re: awesome feature (yet to be added?)


From: Andreas Röhler
Subject: Re: awesome feature (yet to be added?)
Date: Sun, 04 May 2014 20:33:58 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Icedove/24.4.0

On 04.05.2014 03:23, Bric wrote:

I had some private responses that suggest my original post wasn't too clear; i
left my main idea obscurely implied:

I am suggesting an INVERSION or reversal of whatever commented/uncommented state
of EVERY LINE in the selected region.

See my example below:  the before and after states are inverted.  The before
state has a commented block then an uncommented block.

My hypothetical command reverses that: the after state has an uncommented block
followed by a commented block.  That effect should take place in one command,
with the entire eight lines of code selected a single selected block to which to
apply the command.

hope this clarifies it...

On May 3, 2014 at 2:47 PM Bric <address@hidden> wrote:


Hi, all

unless it already exists, I thought of an awesome time-saving command:
invert-comment

this to be on a par with "comment-region" and "uncomment-region".

"invert-comment" would change something like this :

    /* int b_progress; */
     /* int i_seek; */
     /* hnd_t hin; */
     /* hnd_t hout; */

     int c_progress;
     int j_seek;
     hnd_e hin;
     hnd_f hout;


to:


     int b_progress;
     int i_seek;
     hnd_t hin;
     hnd_t hout;

     /* int c_progress; */
     /* int j_seek; */
     /* hnd_e hin; */
     /* hnd_f hout; */


-------------

not for all occasions, but can be very useful for some, it seems to me.

Maybe it's easily added with a scheme script or something.

thanks!




When code is marked as region,

M-x comment-dwim RET should do what you want.

Without region, this inverts also linewise:

ar-comment-or-uncomment-lor

available here:

https://launchpad.net/s-x-emacs-werkstatt



reply via email to

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