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

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

Re: beautifying the current line


From: harven
Subject: Re: beautifying the current line
Date: Thu, 24 Apr 2008 03:10:57 -0700 (PDT)
User-agent: G2/1.0

On Apr 23, 11:26 pm, TheLonelyStar <nab...@lonely-star.org> wrote:
> Hi,
>
> When I press tab in emacs (while editing an c++ file), it indents the
> current line. Very good!
> I was wondering if maybe emacs could do even more. Look at this example:
> What if pressing tab on something like this:
>
> LongTypeName a;
> int b; //<-press tab on this line
>
> Would result in:
>
> LongTypeName a;
> int                 b;
>
> Like running astyle. But only the current line is changed.
> I do not want to change the whole buffer, just the current line.
> I also do not want to select a region for this. Just press tab, like I do
> when I want indention.
>
> Is this possible?
> Thanks!
> Nathan
> --
> View this message in 
> context:http://www.nabble.com/beautifying-the-current-line-tp16834831p1683483...
> Sent from the Emacs - Help mailing list archive at Nabble.com.

If you are looking for alignment of assignments, try  M-x align-
current

It works on the current section, I think that's what you want.
Have a look on the emacs wiki, in CategoryAlignment, for more details.


reply via email to

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